diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d6abfdf5cb5..a830af2c168 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -73,6 +73,7 @@ Thank you! Assar Westerlund Axel Westerhold Aymeric Vincent + Baolin Zhu Barry Dobyns Ben Kallus Benjamin Kerensa diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 3f5db81ad55..2ccf9ecc70f 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -393,7 +393,11 @@ HttpHeader::skipUpdateHeader(const Http::HdrType id) const return // TODO: Consider updating Vary headers after comparing the magnitude of // the required changes (and/or cache losses) with compliance gains. - (id == Http::HdrType::VARY); + (id == Http::HdrType::VARY) || + // RFC 9111 Section 3.2 explicitly excludes Content-Length + // from the "MUST add ..., replacing already present" list. Also, + // broken servers are known to send Content-Length:0 in their 304s. + (id == Http::HdrType::CONTENT_LENGTH); } void