From: Amos Jeffries Date: Sat, 25 Feb 2012 04:19:26 +0000 (-0700) Subject: Drop dead code in reply parsing X-Git-Tag: SQUID_3_2_0_16~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b047537efefccd6034612eaf014626563277bdf3;p=thirdparty%2Fsquid.git Drop dead code in reply parsing 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. --- diff --git a/src/http.cc b/src/http.cc index 45a4e9c6d3..95b7fed354 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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;