HttpRequest::parseFirstLine(const char *start, const char *end)
{
const char *t = start + strcspn(start, w_space);
- SBuf m(start, start-t);
+ SBuf m(start, start-t); // XXX: SBuf ctor allocates and data-copies. performance regression.
method = HttpRequestMethod(m);
if (method == Http::METHOD_NONE)
return false;
- start = t + strspn(t, w_space);
+ start = t + strspn(t, w_space); // XXX: breaks if whitespace exists in URL
const char *ver = findTrailingHTTPVersion(start, end);
if (!hp.headerBlockSize())
return true;
+ // XXX: c_str() reallocates. performance regression.
const bool result = header.parse(hp.mimeHeader().c_str(), hp.headerBlockSize());
if (result)
* (ie, none, so don't try parsing em)
*/
int64_t mimeHeaderBytes = 0;
+ // XXX: c_str() reallocates. performance regression.
if ((mimeHeaderBytes = headersEnd(buf_.c_str(), buf_.length())) == 0) {
if (buf_.length()+firstLineSize() >= Config.maxRequestHeaderSize) {
debugs(33, 5, "Too large request");