-
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
Jetty 12 content length 0 take3 #9740
Conversation
Create and use a pre-encoded HttpFields.CONTENT_LENGTH_0 constant Used the constant in more places renamed the `putLongField` methods of HttpFields.Mutable to just `put`
Create and use a pre-encoded HttpFields.CONTENT_LENGTH_0 constant Used the constant in more places renamed the `putLongField` methods of HttpFields.Mutable to just `put`
Create and use a pre-encoded HttpFields.CONTENT_LENGTH_0 constant Used the constant in more places renamed the `putLongField` methods of HttpFields.Mutable to just `put`
…ent-Length-0-take3
…ent-Length-0-take3 # Conflicts: # jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiResponse.java
As I was looking around at our CONTENT_LENGTH usage (in this branch), I was struck by an apparent set of bugs in the jetty-documentation's server/HandlerDocs. There's 8 occurrences of this line in the above file. |
This one seems like a bug. Why would we ever want to write a blank CONTENT_LENGTH header? |
@joakime I'll fix those in this PR as well.... |
Note also that it is kind of a bug to add headers like CONTENT_LENGTH and CONTENT_TYPE as there should only be 1 of those. Thus put should be used. Should we produce a warning if somebody adds one of these? |
@joakime I fixed the CONTENT_LENGTH->CONTENT_TYPE ones, as they are kind of related to this. But I've left the FCGI one alone, as I'm not sure if that is a bug or not (looks deliberate). |
Create and use a pre-encoded HttpFields.CONTENT_LENGTH_0 constant
Used the constant in more places
renamed the
putLongField
methods of HttpFields.Mutable to justput
(third attempt after forced push zero event incident!)