]> git.ipfire.org Git - thirdparty/squid.git/commit - src/http.cc
RFC 9111: Stop treating Warning specially (#1072)
authorAmos Jeffries <yadij@users.noreply.github.com>
Sat, 23 Jul 2022 23:14:23 +0000 (23:14 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 24 Jul 2022 15:01:14 +0000 (15:01 +0000)
commit0ac163be29691c2c8a296153331e4f6f862b2356
tree289177fafd30f181599886a583bf8d329f390af2
parent96f97829e13e12cfaa59fa51ef73787c472563da
RFC 9111: Stop treating Warning specially (#1072)

RFC 9111 obsoletes the Warning header, removing all specification
requirements about it. Likewise, this update changes Squid behaviour in
regards to that header:

1) Squid no longer adds Warning headers to generated or forwarded
   messages. Miss responses from servers/peers and hits cached by an
   older version of Squid may still have Warning headers.

2) On 304 revalidation, Warning header are treated the same as any
   other/generic header. They are added or replaced according to their
   presence in the 304 reply. Absent any Warning update by a 304, Squid
   may still deliver cached content with old Warning headers.

3) Squid no longer validates received Warning headers. RFC 7234 placed
   syntax requirements and limits on how old some Warning values could
   be (when dated). Those checks are no longer being performed. The
   header value is now treated as an opaque string.

4) Warning header usage and types are no longer tracked in message
   statistics available through cache manager.

Updated documentation references to reflect RFC 7234 becoming obsolete.
12 files changed:
src/HappyConnOpener.cc
src/HttpHeader.cc
src/HttpHeader.h
src/HttpReply.cc
src/HttpReply.h
src/HttpRequest.cc
src/client_side_reply.cc
src/http.cc
src/http/RegisteredHeaders.h
src/http/RegisteredHeadersHash.cci
src/http/RegisteredHeadersHash.gperf
src/tests/stub_HttpHeader.cc