]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Don't try parsing a blank request!
authoradrian <>
Mon, 2 Oct 2006 08:22:22 +0000 (08:22 +0000)
committeradrian <>
Mon, 2 Oct 2006 08:22:22 +0000 (08:22 +0000)
src/client_side.cc

index 26715aaedae9dc9079eb8354ca72326c5acf1c1f..fbd401966e902a306fb6f025bd81864476e5e436 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.741 2006/10/02 01:34:18 adrian Exp $
+ * $Id: client_side.cc,v 1.742 2006/10/02 02:22:22 adrian Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -2351,6 +2351,10 @@ clientParseRequest(ConnStateData::Pointer conn, bool &do_next_read)
     while (conn->in.notYetUsed > 0 && conn->bodySizeLeft() == 0) {
         connStripBufferWhitespace (conn);
 
+       /* Don't try to parse if the buffer is empty */
+       if (conn->in.notYetUsed == 0)
+               break;
+
         /* Limit the number of concurrent requests to 2 */
 
         if (!connOkToAddRequest(conn)) {