Skip to content

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 lorban and sbordet 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
8 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

No open 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

4 participants