]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #2001: Read full response headers when >4KB
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Sun, 30 Mar 2008 16:38:00 +0000 (18:38 +0200)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Sun, 30 Mar 2008 16:38:00 +0000 (18:38 +0200)
cherrypicked from trunk to complete support for large responses.

src/http.cc

index 41913774a451ff573978639b771d860714c6fafb..af8d44d375fcebbae2999d02cceb0107d5c37b9a 100644 (file)
@@ -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);
     }
 }