From: adrian <> Date: Mon, 2 Oct 2006 08:22:22 +0000 (+0000) Subject: Don't try parsing a blank request! X-Git-Tag: SQUID_3_0_PRE5~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4681057ee3971b5a7d2bce3a669b3155d6a2e7fa;p=thirdparty%2Fsquid.git Don't try parsing a blank request! --- diff --git a/src/client_side.cc b/src/client_side.cc index 26715aaeda..fbd401966e 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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)) {