]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Drop dead code in reply parsing
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 9 Feb 2012 13:27:51 +0000 (06:27 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 9 Feb 2012 13:27:51 +0000 (06:27 -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 b8dc2011988dfbf74abbfa0136c75fadac904235..63f78bac35fc5e354348fd9c604f29a8259f55cf 100644 (file)
@@ -1116,24 +1116,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;