From: Amos Jeffries Date: Thu, 9 Feb 2012 13:27:51 +0000 (-0700) Subject: Drop dead code in reply parsing X-Git-Tag: BumpSslServerFirst.take05~12^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=648f6eb287405f82cd5a1993577dcbf34298bbc5;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 b8dc201198..63f78bac35 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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;