int count = 0;
assert(this && range_spec);
++ParsedCount;
- debugs(64, 8, "parsing range field: '" << range_spec->unsafeBuf() << "'");
+ debugs(64, 8, "parsing range field: '" << range_spec << "'");
/* check range type */
if (range_spec->caseCmp("bytes=", 6))
return 0;
/* skip "bytes="; hack! */
- pos = range_spec->unsafeBuf() + 6;
+ pos = range_spec->termedBuf() + 6;
/* iterate through comma separated list */
while (strListGetItem(range_spec, ',', &item, &ilen, &pos)) {
ScFieldsInfo, SC_ENUM_END);
if (type < 0) {
- debugs(90, 2, "hdr sc: unknown control-directive: near '" << item << "' in '" << str->unsafeBuf() << "'");
+ debugs(90, 2, "hdr sc: unknown control-directive: near '" << item << "' in '" << str << "'");
type = SC_OTHER;
}
if (EBIT_TEST(sct->mask, type)) {
if (type != SC_OTHER)
- debugs(90, 2, "hdr sc: ignoring duplicate control-directive: near '" << item << "' in '" << str->unsafeBuf() << "'");
+ debugs(90, 2, "hdr sc: ignoring duplicate control-directive: near '" << item << "' in '" << str << "'");
ScFieldsInfo[type].stat.repCount++;
if (EBIT_TEST(sc->mask, flag) && flag != SC_OTHER) {
/* print option name */
- packerPrintf(p, (pcount ? ", %s" : "%s"), ScFieldsInfo[flag].name.unsafeBuf());
+ packerPrintf(p, (pcount ? ", %.*s" : "%.*s"),
+ ScFieldsInfo[flag].name.size(),
+ ScFieldsInfo[flag].name.rawBuf());
/* handle options with values */
packerPrintf(p, "=%d", (int) sc->max_age);
if (flag == SC_CONTENT)
- packerPrintf(p, "=\"%s\"", sc->content.unsafeBuf());
+ packerPrintf(p, "=\"%.*s\"", sc->content.size(), sc->content.rawBuf());
pcount++;
}
}
if (sc->target.size())
- packerPrintf (p, ";%s", sc->target.unsafeBuf());
+ packerPrintf (p, ";%.*s", sc->target.size(), sc->target.rawBuf());
}
void
extern const HttpHeaderStat *dump_stat; /* argh! */
const int id = (int) val;
const int valid_id = id >= 0 && id < SC_ENUM_END;
- const char *name = valid_id ? ScFieldsInfo[id].name.unsafeBuf() : "INVALID";
+ const char *name = valid_id ? ScFieldsInfo[id].name.termedBuf() : "INVALID";
if (count || valid_id)
storeAppendPrintf(sentry, "%2d\t %-20s\t %5d\t %6.2f\n",
extern const HttpHeaderStat *dump_stat; /* argh! */
const int id = (int) val;
const int valid_id = id >= 0 && id < SC_ENUM_END;
- const char *name = valid_id ? ScFieldsInfo[id].name.unsafeBuf() : "INVALID";
+ const char *name = valid_id ? ScFieldsInfo[id].name.termedBuf() : "INVALID";
if (count || valid_id)
storeAppendPrintf(sentry, "%2d\t %-20s\t %5d\t %6.2f\n",
while (node) {
HttpHdrScTarget *sct = (HttpHdrScTarget *)node->data;
- if (target && sct->target.unsafeBuf() && !strcmp (target, sct->target.unsafeBuf()))
+ if (target && sct->target.defined() && !strcmp (target, sct->target.termedBuf()))
return sct;
- else if (!target && !sct->target.unsafeBuf())
+ else if (!target && sct->target.undefined())
return sct;
node = node->next;