From: Alex Rousskov Date: Tue, 15 Sep 2020 04:07:43 +0000 (+0000) Subject: Restored support for non-lowercase Transfer-Encoding values (#723) X-Git-Tag: SQUID_4_14~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88eb12ae5bff252d7bddc0d715133e6a385a4770;p=thirdparty%2Fsquid.git Restored support for non-lowercase Transfer-Encoding values (#723) ... after "Improve Transfer-Encoding handling" commit f6dd87e. Folks are reporting Chunked Transfer-Encoding values in real traffic. HTTP requires case-insensitve treatment of codings. --- diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index f30802eb79..8efc1d60ab 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -480,9 +480,9 @@ HttpHeader::parse(const char *header_start, size_t hdrLen) delById(Http::HdrType::CONTENT_LENGTH); // and clen state becomes irrelevant - if (rawTe == "chunked") { + if (rawTe.caseCmp("chunked") == 0) { ; // leave header present for chunked() method - } else if (rawTe == "identity") { // deprecated. no coding + } else if (rawTe.caseCmp("identity") == 0) { // deprecated. no coding delById(Http::HdrType::TRANSFER_ENCODING); } else { // This also rejects multiple encodings until we support them properly.