From: Henrik Nordstrom Date: Sun, 30 Mar 2008 16:38:00 +0000 (+0200) Subject: Bug #2001: Read full response headers when >4KB X-Git-Tag: SQUID_3_0_STABLE5~26^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=944f908d99f3fac4469f382269229a6816672957;p=thirdparty%2Fsquid.git Bug #2001: Read full response headers when >4KB cherrypicked from trunk to complete support for large responses. --- diff --git a/src/http.cc b/src/http.cc index 41913774a4..af8d44d375 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1213,12 +1213,16 @@ HttpStateData::maybeReadVirginBody() * handler until we get a notification from someone that * its okay to read again. */ - if (read_sz < 2) - return; + if (read_sz < 2) { + if (flags.headers_parsed) + return; + else + read_sz = 1024; + } if (flags.do_next_read) { - flags.do_next_read = 0; - entry->delayAwareRead(fd, readBuf->space(), read_sz, ReadReplyWrapper, this); + flags.do_next_read = 0; + entry->delayAwareRead(fd, readBuf->space(read_sz), read_sz, ReadReplyWrapper, this); } }