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_5_0_5~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5715da3c66bf742944ffac23827050c8dd316221;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 c2d41bb12c..07db917186 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -551,9 +551,9 @@ HttpHeader::parse(const char *header_start, size_t hdrLen, Http::ContentLengthIn 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.