-
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
HTTP 400 and NPE in HttpParser for blank header value in Jetty 12.x #11290
Comments
NPE is definitely a bug. Need to think about if we let the space through or not. |
Here is the wire log for the success case:
and the failure case:
|
Thanks. I've reproduced it. It is the double space in a cacheable field that we are not handling well. standby.... |
Fix merged and will be in the next release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jetty Version
12.0.5
Jetty Environment
ee10
but not relevant in this caseJava Version
21.0.2 (Corretto)
Question
After upgrading from 11.x to 12.x noticed a difference in header parsing. One of our tests for bad auth header values is now failing inside Jetty header parsing without reaching our handler. Below is a minimal reproducer with Jetty 12.0.5 and Apache HTTP client:
I expect Jetty to pass the blank
" "
header value just like the empty""
header value to the hander and let the handler decide what to do. This was the behavior in Jetty 11, but in Jetty 12 the blank value will throw a NPE inside Jetty header parser and result in HTTP 400 response.Could you please check if this is a bug or an expected behavior change in header parsing?
The text was updated successfully, but these errors were encountered: