Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC9110 - GzipHandler must produce Content-Location header on 304 response? #8907

Open
joakime opened this issue Nov 16, 2022 · 4 comments
Open
Labels
Bug For general bugs on Jetty side Specification For all industry Specifications (IETF / Servlet / etc)

Comments

@joakime
Copy link
Contributor

joakime commented Nov 16, 2022

Jetty version(s)
Jetty 10+

Description
When working Issue #8905 about the Vary header in 304 responses, I noticed a curious header called Content-Location.

See RFC9110, and the Content-Location header - https://www.rfc-editor.org/rfc/rfc9110#field.content-location

Seems that when the GzipHandler produces a 304 (Not Modified) it MUST produce a Content-Location response header?
https://www.rfc-editor.org/rfc/rfc9110#name-304-not-modified

The server generating a 304 response MUST generate any of the following header fields that would have been sent in a 200 (OK) response to the same request:

Content-Location, Date, ETag, and Vary
Cache-Control and Expires (see [CACHING])

@joakime joakime added Bug For general bugs on Jetty side Specification For all industry Specifications (IETF / Servlet / etc) labels Nov 16, 2022
@joakime
Copy link
Contributor Author

joakime commented Nov 16, 2022

@gregw what do you think?

@gregw
Copy link
Contributor

gregw commented Nov 17, 2022

I think that we never generate a Content-Location header with any of our 200 responses, so we therefore meet the criteria of "MUST generate any of the following header fields that would have been sent in a 200 (OK) response". I.e since we don't generate in a 200, then we don't need to generate in a 304.

Besides, the GzipHandler never produces a 304, it only reacts if something else produces a 304.

@joakime
Copy link
Contributor Author

joakime commented Nov 17, 2022

Could this be a possible requirement for ResourceService then? that produces a 304.

@gregw
Copy link
Contributor

gregw commented May 26, 2024

Let's make this for consideration as part of #8769 otherwise leave GzipHandler as is for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side Specification For all industry Specifications (IETF / Servlet / etc)
Projects
Status: No status
Development

No branches or pull requests

2 participants