From: Amos Jeffries Date: Sat, 1 Aug 2009 08:36:48 +0000 (+1200) Subject: Debugs message about error when headers < minimum size X-Git-Tag: SQUID_3_0_STABLE18~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3eb57db0a56ab1214f1e89a8cc7d0954b1336974;p=thirdparty%2Fsquid.git Debugs message about error when headers < minimum size --- diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc index 8b80f4ffd1..357e0ffb11 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -154,8 +154,7 @@ bool HttpMsg::parse(MemBuf *buf, bool eof, http_status *error) // 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; } diff --git a/src/HttpReply.cc b/src/HttpReply.cc index a25527615a..59104cd683 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -446,8 +446,10 @@ HttpReply::sanityCheckStartLine(MemBuf *buf, const size_t hdr_len, http_status * // 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; } diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 4e921bc5bd..0a6e8578b2 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -156,6 +156,7 @@ HttpRequest::sanityCheckStartLine(MemBuf *buf, const size_t hdr_len, http_status 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;