On 15/04/2020 06:32, Chirag Dewan wrote: > Hi, > > I have a Jersey application deployed on an Embedded Tomcat 9.0.29. I have > enabled the APR connector with HTTP2 Upgrade Protocol to support HTTP2 > requests. > > Now when I try to get :authority and :path header from the > HttpServletRequest, I get null. > > I debugged this and saw that the coyoteRequest - org.apache.coyote.Request > has only HTTP1.1 headers and skips HTTP2 headers. > > Although I know that I can probably use coyoteRequest to get the URL, path > and other pseudo header details, but is there any other way to get the > pseudo headers like other HTTP1.1 headers?
:method No HTTP/1.1 equivalent header (it is part of the request line) Use HttpServletRequest.getMethod() for HTTP/1.1 and HTTP/2. :scheme No HTTP/1.1 equivalent header (it is part of the request line) Use ServletRequest.getScheme() for HTTP/1.1 and HTTP/2. :path No HTTP/1.1 equivalent header (it is part of the request line) Use HttpServletRequest.getRequestURI() for HTTP/1.1 and HTTP/2. :authority Equivalent to the HTTP/1.1 Host header Use ServletRequest.getServerName() and ServletRequest.getServerPort() for HTTP/1.1 and HTTP/2. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org