CcFieldsInfo, CC_ENUM_END);
if (type < 0) {
- debugs(65, 2, "hdr cc: unknown cache-directive: near '" << item << "' in '" << str->unsafeBuf() << "'");
+ debugs(65, 2, "hdr cc: unknown cache-directive: near '" << item << "' in '" << str << "'");
type = CC_OTHER;
}
if (EBIT_TEST(cc->mask, type)) {
if (type != CC_OTHER)
- debugs(65, 2, "hdr cc: ignoring duplicate cache-directive: near '" << item << "' in '" << str->unsafeBuf() << "'");
+ debugs(65, 2, "hdr cc: ignoring duplicate cache-directive: near '" << item << "' in '" << str << "'");
CcFieldsInfo[type].stat.repCount++;
{
assert(cc);
- if (cc->other.unsafeBuf())
+ if (cc->other.defined())
cc->other.clean();
memFree(cc, MEM_HTTP_HDR_CC);
if (EBIT_TEST(cc->mask, flag) && flag != CC_OTHER) {
/* print option name */
- packerPrintf(p, (pcount ? ", %s" : "%s"), CcFieldsInfo[flag].name.unsafeBuf());
+ packerPrintf(p, (pcount ? ", %.*s" : "%.*s"),
+ CcFieldsInfo[flag].name.size(),
+ CcFieldsInfo[flag].name.rawBuf());
/* handle options with values */
}
if (cc->other.size())
- packerPrintf(p, (pcount ? ", %s" : "%s"), cc->other.unsafeBuf());
+ packerPrintf(p, (pcount ? ", %.*s" : "%.*s"),
+ cc->other.size(), cc->other.rawBuf());
}
/* negative max_age will clean old max_Age setting */
extern const HttpHeaderStat *dump_stat; /* argh! */
const int id = (int) val;
const int valid_id = id >= 0 && id < CC_ENUM_END;
- const char *name = valid_id ? CcFieldsInfo[id].name.unsafeBuf() : "INVALID";
+ const char *name = valid_id ? CcFieldsInfo[id].name.termedBuf() : "INVALID";
if (count || valid_id)
storeAppendPrintf(sentry, "%2d\t %-20s\t %5d\t %6.2f\n",
if (orig_request->auth_user_request)
username = orig_request->auth_user_request->username();
else if (orig_request->extacl_user.size())
- username = orig_request->extacl_user.unsafeBuf();
+ username = orig_request->extacl_user.termedBuf();
snprintf(loginbuf, sizeof(loginbuf), "%s%s", username, orig_request->peer_login + 1);
httpHdrCcSetMaxAge(cc, getMaxAge(url));
if (request->urlpath.size())
- assert(strstr(url, request->urlpath.unsafeBuf()));
+ assert(strstr(url, request->urlpath.termedBuf()));
}
/* Enforce sibling relations */
void
copyOneHeaderFromClientsideRequestToUpstreamRequest(const HttpHeaderEntry *e, String strConnection, HttpRequest * request, HttpRequest * orig_request, HttpHeader * hdr_out, int we_do_ranges, http_state_flags flags)
{
- debugs(11, 5, "httpBuildRequestHeader: " << e->name.unsafeBuf() << ": " << e->value.unsafeBuf());
+ debugs(11, 5, "httpBuildRequestHeader: " << e->name << ": " << e->value );
if (!httpRequestHdrAllowed(e, &strConnection)) {
- debugs(11, 2, "'" << e->name.unsafeBuf() << "' header denied by anonymize_headers configuration");
+ debugs(11, 2, "'" << e->name << "' header denied by anonymize_headers configuration");
return;
}
HttpVersion httpver(1, 0);
mb->Printf("%s %s HTTP/%d.%d\r\n",
RequestMethodStr(request->method),
- request->urlpath.size() ? request->urlpath.unsafeBuf() : "/",
+ request->urlpath.size() ? request->urlpath.termedBuf() : "/",
httpver.major,httpver.minor);
/* build and pack headers */
{