jetty.project
jetty.project copied to clipboard
Review CompressedContentFormat.tagEquals()
Jetty version 9.4.x
Description
The logic in CompressedContentFormat.tagEquals() is quite obscure and possibly wrong.
If etag=foo and tag=foo--gzip then tagEquals(etag, tag) returns false.
However, for etag="foo" and tag="foo--gzip" tagEquals(etag, tag) returns true because the final " is implicitly considered in the tagEquals() logic.
Need to review whether tags may not have " and comment the code with an example, and add tests for new behaviors if necessary.
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.
@gregw is this still relevant for 12?
@joakime can you look at this as part of your work on #2553
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.
@joakime have a look at the etag logic in #13332 and see if you can make it match.
With regards to DQUOTES in etags, the tag must always be quoted and the weak prefix w/ is considered not part of the etag.
Hence w/"12345678" and "12345678" are both valid values for etag headers, but w/12345678 and 12345678 are not.
This has been addressed in 12.1.x