From: hno <> Date: Mon, 7 Jan 2008 22:16:03 +0000 (+0000) Subject: Bug #2001: Read full response headers when >4KB X-Git-Tag: BASIC_TPROXY4~209 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53dbd8cbefebb1f1aaedc4e4472bdbf8389052a6;p=thirdparty%2Fsquid.git Bug #2001: Read full response headers when >4KB This is a first step at supporting large response headers, enabling support in the http protocol handler. There is still more work to do in other areas before this works. --- diff --git a/src/http.cc b/src/http.cc index 1477d5fccd..28a4e011f4 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.543 2007/12/26 23:39:55 hno Exp $ + * $Id: http.cc,v 1.544 2008/01/07 15:16:03 hno Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -1267,12 +1267,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); } }