-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Exception when a Content-Length is set on a 304 response #12481
Comments
@sbordet the error says that the RFC9110 says ...
My interpretation is that if that same request, without the use of |
@joakime I don't understand your comment. The OP is right that we should allow for the |
Our HttpGenerator explicitly allows for the content-length in a 304 response, but our write length sanity check does not. |
I also note that we should be sending content headers with our own 304 responses: https://www.rfc-editor.org/rfc/rfc9110#status.304 |
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.
Jetty version(s)
12
Jetty Environment
ee8
Java version/vendor
(use: java -version)
openjdk version "17.0.12" 2024-07-16
OS type/version
Ubuntu 24.04
Description
When a Content-Length is set on a 304 response, the following exception occurs :
RFC7230 allows a Content-Length on 304 responses, see #4208.
The pull request that introduced this control: #10948.
The text was updated successfully, but these errors were encountered: