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

Fix #12481 Handle headers with 304 responses #12484

Merged
merged 3 commits into from
Nov 8, 2024
Merged

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Nov 6, 2024

Fix #12481 Allow Content-Length header to be set with a 304 response Follow RFC9110 recommendations for headers to be sent with 304 response.

Allow Content-Length header to be set with a 304 response
Follow RFC9110 recommendations for headers to be sent with 304 response.
@gregw gregw linked an issue Nov 6, 2024 that may be closed by this pull request
@gregw gregw requested review from joakime, lorban and sbordet November 6, 2024 01:05
Allow Content-Length header to be set with a 304 response
Follow RFC9110 recommendations for headers to be sent with 304 response.
@gregw
Copy link
Contributor Author

gregw commented Nov 6, 2024

@joakime technically, we should be setting the etag with 304 responses, but it is too difficult for the GzipResponse wrapper to know if the response would have been compressed or not, and thus it cannot tell if the etag should have the suffix appended.
We can do so if there is an If-Match header, as we know how the previous response was compressed.

All in all, looking for a better solution.

@gregw gregw requested review from sbordet and lorban November 6, 2024 21:58
@gregw gregw requested a review from lorban November 7, 2024 19:59
@gregw gregw merged commit f78cbc1 into jetty-12.0.x Nov 8, 2024
10 checks passed
@gregw gregw deleted the fix/12481/304headers branch November 8, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Exception when a Content-Length is set on a 304 response
3 participants