tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 63932] Content compression breaks contract of ETag
Date Mon, 18 Nov 2019 23:25:38 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=63932

--- Comment #6 from Konstantin Kolinko <knst.kolinko@gmail.com> ---
(In reply to Mark Thomas from comment #5)
> Please take care, as Julian did, to be specific about whether you are
> talking about weak or strong validators.
> 
> RFC 7232 states (section 2.1)
> <quote>[...]</quote>
> 
> So the Default servlet (that only ever sets a weak ETag) is fine. As is the
> WebDAV servlet.

+1

> Where things get "interesting" is when resources set their own, strong ETag.
> It looks to me that the simplest solution would be for the container
> provided compression to check for the presence of a strong ETag and, if it
> finds one, prepend the weakness indicator to the ETag if it is going to
> compress the resource.

Interesting idea. But I think such feature has to be documented. A server
administrator should be aware that changing a Connector setting will change
behaviour of a web application in that way as well. (Changing strong ETag to a
weak one may affect performance of caches.)

Another possible solution is to do not compress a response if a strong ETag is
encountered. The same what we do when a response is already compressed.

https://github.com/apache/tomcat/blob/9.0.29/java/org/apache/coyote/CompressionConfig.java#L203

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message