]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: compression: Rewrite strong ETags
authorTim Duesterhus <tim@bastelstu.be>
Tue, 29 Jan 2019 15:38:56 +0000 (16:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Jan 2019 19:26:06 +0000 (20:26 +0100)
commitb229f018eedef4d18571ce6da23d8e153249a836
tree7a4456832362614effd9bf24c4f9d1bb008b46c6
parent74931147292699384e42343b2fac59003ee73b0c
BUG/MEDIUM: compression: Rewrite strong ETags

RFC 7232 section 2.3.3 states:

> Note: Content codings are a property of the representation data,
> so a strong entity-tag for a content-encoded representation has to
> be distinct from the entity tag of an unencoded representation to
> prevent potential conflicts during cache updates and range
> requests.  In contrast, transfer codings (Section 4 of [RFC7230])
> apply only during message transfer and do not result in distinct
> entity-tags.

Thus a strong ETag must be changed when compressing. Usually this is done
by converting it into a weak ETag, which represents a semantically, but not
byte-by-byte identical response. A conversion to a weak ETag still allows
If-None-Match to work.

This should be backported to 1.9 and might be backported to every supported
branch with compression.
doc/configuration.txt
reg-tests/compression/h00001.vtc [new file with mode: 0644]
src/flt_http_comp.c