------------------------------------------------------------ revno: 13781 revision-id: squid3@treenet.co.nz-20150321075313-9wmg1n402l5huh8j parent: squid3@treenet.co.nz-20150321075049-ruuyv4hdkhaycpnt fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4206 author: Mike Mitchell committer: Amos Jeffries branch nick: 3.5 timestamp: Sat 2015-03-21 00:53:13 -0700 message: Bug 4206: Regression in expect:100-continue ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20150321075313-9wmg1n402l5huh8j # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: 592c9ac369963d6c95b8f017756f32c8c5dbf505 # timestamp: 2015-03-21 08:17:40 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20150321075049-\ # ruuyv4hdkhaycpnt # # Begin patch === modified file 'src/client_side.cc' --- src/client_side.cc 2015-03-03 14:45:57 +0000 +++ src/client_side.cc 2015-03-21 07:53:13 +0000 @@ -233,7 +233,8 @@ debugs(33, 4, HERE << clientConnection << ": reading request..."); - if (!in.maybeMakeSpaceAvailable()) + // we can only read if there is more than 1 byte of space free + if (Config.maxRequestBufferSize - in.buf.length() < 2) return; typedef CommCbMemFunT Dialer; @@ -3237,6 +3238,7 @@ * Plus, it breaks our lame *HalfClosed() detection */ + in.maybeMakeSpaceAvailable(); CommIoCbParams rd(this); // will be expanded with ReadNow results rd.conn = io.conn; switch (Comm::ReadNow(rd, in.buf)) { @@ -3530,9 +3532,6 @@ BodyProducer::start(); HttpControlMsgSink::start(); - // ensure a buffer is present for this connection - in.maybeMakeSpaceAvailable(); - if (port->disable_pmtu_discovery != DISABLE_PMTU_OFF && (transparent() || port->disable_pmtu_discovery == DISABLE_PMTU_ALWAYS)) { #if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)