-
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/2 with HttpServletRequest.getHeader("Host") returns null on Jetty 10, but a valid value on Jetty 9 #5304
Comments
I don't think we should always add a Host header for HTTP/2, as that is a lot of wasted work for apps that don't use the Host header. Instead we could either write an optional customizer and/or rewrite rule that will add a Host header from the authority of a HTTP/2 request |
Note (to others that read this) that to get the authority from the
|
We could probably improve the |
@gregw I think we should have a module to enable the |
Updated HostHeaderCustomizer to actually add the Host header, either from values passed in the custructor or from the getServerName and getServerPort methods. The HttpURI is no longer updated. Signed-off-by: Greg Wilkins <[email protected]>
+ Found and fixed bug in HttpFields + Added port normalization support to HttpScheme + added test Signed-off-by: Greg Wilkins <[email protected]>
+ refixed bug in HttpFields Signed-off-by: Greg Wilkins <[email protected]>
+ updated more options doco and handling Signed-off-by: Greg Wilkins <[email protected]>
+ still fixing HttpFields bug Signed-off-by: Greg Wilkins <[email protected]>
* Issue #5264 Jetty Home warning Warn when using jetty home as a jetty base * Issue #5304 HTTP2 HostHeader + updated more options doco and handling Signed-off-by: Greg Wilkins <[email protected]> * Issue #5264 Jetty Home warning updates from review
* Issue #5304 HTTP2 HostHeader Updated HostHeaderCustomizer to actually add the Host header, either from values passed in the custructor or from the getServerName and getServerPort methods. The HttpURI is no longer updated. Signed-off-by: Greg Wilkins <[email protected]> * Issue #5304 HTTP2 HostHeader + Found and fixed bug in HttpFields + Added port normalization support to HttpScheme + added test Signed-off-by: Greg Wilkins <[email protected]> * blank line Signed-off-by: Greg Wilkins <[email protected]> * Issue #5304 HTTP2 HostHeader + refixed bug in HttpFields Signed-off-by: Greg Wilkins <[email protected]> * Issue #5304 HTTP2 HostHeader + still fixing HttpFields bug Signed-off-by: Greg Wilkins <[email protected]> * Issue #5304 HTTP2 Host Header updates from review
refactored common code fast alphabet lookup
Jetty version
10.0.x
Description
If you make an HTTP/2 request, and then in your servlet you use
HttpServletRequest.getHeader("Host")
the value is null on Jetty 10.But it returns a value on Jetty 9.
Screenshot of Jetty 9 (notice the "Host" header in the enumerated headers)
Screenshot of Jetty 10 (no "Host" header in the enumerated headers)
The text was updated successfully, but these errors were encountered: