jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Review CompressedContentFormat.tagEquals()

Open sbordet opened this issue 4 years ago • 5 comments

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.

sbordet avatar Feb 17 '21 19:02 sbordet

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.

github-actions[bot] avatar Feb 18 '22 00:02 github-actions[bot]

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.

github-actions[bot] avatar Feb 22 '23 00:02 github-actions[bot]

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.

github-actions[bot] avatar Feb 27 '24 00:02 github-actions[bot]

@gregw is this still relevant for 12?

sbordet avatar Feb 27 '24 08:02 sbordet

@joakime can you look at this as part of your work on #2553

gregw avatar Jul 12 '24 23:07 gregw

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.

github-actions[bot] avatar Jul 20 '25 00:07 github-actions[bot]

@joakime have a look at the etag logic in #13332 and see if you can make it match.

gregw avatar Jul 21 '25 06:07 gregw

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.

gregw avatar Jul 21 '25 06:07 gregw

This has been addressed in 12.1.x

joakime avatar Oct 16 '25 13:10 joakime