// sanity check the start line to see if this is in fact an HTTP message
if (!sanityCheckStartLine(buf, hdr_len, error)) {
- debugs(58,1, HERE << "first line of HTTP message is invalid");
- // NP: sanityCheck sets *error
+ // NP: sanityCheck sets *error and sends debug warnings.
return false;
}
// content is long enough to possibly hold a reply
// 4 being magic size of a 3-digit number plus space delimiter
if ( buf->contentSize() < (protoPrefix.size() + 4) ) {
- if (hdr_len > 0)
+ if (hdr_len > 0) {
+ debugs(58, 3, HERE << "Too small reply header (" << hdr_len << " bytes)");
*error = HTTP_INVALID_HEADER;
+ }
return false;
}
if ( buf->contentSize() < 2 ) {
// this is ony a real error if the headers apparently complete.
if (hdr_len > 0) {
+ debugs(58, 3, HERE << "Too large request header (" << hdr_len << " bytes)");
*error = HTTP_INVALID_HEADER;
}
return false;