typedef Services::iterator SCI;
for (SCI i = AllServices().begin(); i != AllServices().end(); ++i) {
const ServiceConfig &cfg = (*i)->cfg();
- storeAppendPrintf(entry, "%s %s_%s %s %d %s\n", name, cfg.key.unsafeBuf(),
- cfg.methodStr(), cfg.vectPointStr(), cfg.bypass, cfg.uri.unsafeBuf());
+ storeAppendPrintf(entry, "%s %.*s_%s %s %d %.*s\n", name, cfg.key.size(), cfg.key.rawBuf(),
+ cfg.methodStr(), cfg.vectPointStr(), cfg.bypass, cfg.uri.size(), cfg.uri.rawBuf());
}
}
ConfigParser::ParseString(&uri);
debugs(3, 5, HERE << cfg_filename << ':' << config_lineno << ": " <<
- key.unsafeBuf() << " " << method_point << " " << bypass);
+ key << " " << method_point << " " << bypass);
method = parseMethod(method_point);
point = parseVectPoint(method_point);
// extract scheme and use it as the service_configConfig protocol
const char *schemeSuffix = "://";
if (const char *schemeEnd = uri.pos(schemeSuffix))
- protocol.limitInit(uri.unsafeBuf(), schemeEnd - uri.unsafeBuf());
+ protocol.limitInit(uri.rawBuf(), schemeEnd - uri.rawBuf()); //substring
debugs(3, 5, HERE << cfg_filename << ':' << config_lineno << ": " <<
"service protocol is " << protocol);
if (!protocol.size())
return false;
// skip scheme
- const char *s = uri.unsafeBuf() + protocol.size() + strlen(schemeSuffix);
+ const char *s = uri.termedBuf() + protocol.size() + strlen(schemeSuffix);
const char *e;
const String value = squidId == HDR_OTHER ?
theHeader.getByName(name.image().c_str()) :
theHeader.getStrOrList(squidId);
- return Value::FromTempString(value.unsafeBuf());
+ return Value::FromTempString(value.termedBuf());
}
void
bool Ecap::ServiceRep::wantsUrl(const String &urlPath) const
{
Must(up());
- return theService->wantsUrl(urlPath.unsafeBuf());
+ return theService->wantsUrl(urlPath.termedBuf());
}
Adaptation::Initiate *
if (!stripe_path) {
String result = path;
result.append("/stripe");
- const_cast<CossSwapDir *>(this)->stripe_path = xstrdup(result.unsafeBuf());
+ const_cast<CossSwapDir *>(this)->stripe_path = xstrdup(result.termedBuf());
}
return stripe_path;