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<ConnStateData, CommIoCbParams> Dialer;
* 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)) {
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)