]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Found and fixed a case where HttpMsg::parse() returned false but
authorwessels <>
Fri, 30 Dec 2005 01:04:41 +0000 (01:04 +0000)
committerwessels <>
Fri, 30 Dec 2005 01:04:41 +0000 (01:04 +0000)
forgot to set the error parameter.

src/HttpMsg.cc

index 829ca962cca4f77c570e85c67cb6071a5b13cabe..53b9e005142abea973f1b2c3406c00efaa40fe7a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpMsg.cc,v 1.21 2005/12/01 18:15:51 wessels Exp $
+ * $Id: HttpMsg.cc,v 1.22 2005/12/29 18:04:41 wessels Exp $
  *
  * DEBUG: section 74    HTTP Message
  * AUTHOR: Alex Rousskov
@@ -168,8 +168,11 @@ bool HttpMsg::parse(MemBuf *buf, bool eof, http_status *error)
         return false;
     }
 
-    if (!sanityCheckStartLine(buf, error))     // redundant; could be remvoed
+    if (!sanityCheckStartLine(buf, error)) {
+        debugs(58,1, HERE << "first line of HTTP message is invalid");
+        *error = HTTP_INVALID_HEADER;
         return false;
+    }
 
     const int res = httpMsgParseStep(buf->content(), eof);