]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #2001: Read full response headers when >4KB
authorhno <>
Mon, 7 Jan 2008 22:16:03 +0000 (22:16 +0000)
committerhno <>
Mon, 7 Jan 2008 22:16:03 +0000 (22:16 +0000)
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.

src/http.cc

index 1477d5fccd133c4acfb9732f8135a5e69949111a..28a4e011f47bd60eae5b6e3af76bc13fb8b73221 100644 (file)
@@ -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);
     }
 }