]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Drop dead code in reply parsing
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 25 Feb 2012 04:19:26 +0000 (21:19 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 25 Feb 2012 04:19:26 +0000 (21:19 -0700)
This code has not been used/needed in some time. It can die.

It is also no clear why it existed in the first place. The RFC is not
mentioned by number and RFC 2068/2616 only talk about tolerance for
whitespace before request lines, not replies.

src/http.cc

index 45a4e9c6d3308ebe45c3c1036ff0e4b905a3a8c1..95b7fed3549cc238bd41477bdb856c01625fe15d 100644 (file)
@@ -1115,24 +1115,10 @@ HttpStateData::readReply(const CommIoCbParams &io)
      * doing so breaks HTTP/0.9 replies beginning with witespace, and in addition
      * the response splitting countermeasures is extremely likely to trigger on this,
      * not allowing connection reuse in the first place.
+     *
+     * 2012-02-10: which RFC? not 2068 or 2616,
+     *     tolerance there is all about whitespace between requests and header tokens.
      */
-#if DONT_DO_THIS
-    if (!flags.headers_parsed && len > 0 && fd_table[serverConnection->fd].uses > 1) {
-        /* Skip whitespace between replies */
-
-        while (len > 0 && xisspace(*buf))
-            memmove(buf, buf + 1, len--);
-
-        if (len == 0) {
-            /* Continue to read... */
-            /* Timeout NOT increased. This whitespace was from previous reply */
-            flags.do_next_read = 1;
-            maybeReadVirginBody();
-            return;
-        }
-    }
-
-#endif
 
     if (len == 0) { // reached EOF?
         eof = 1;