Http2: server rejects request with valid :protocol pseudo header
See original GitHub issueExpected behavior
Server accepts request with :protocol
pseudo header (defined in RFC8441) , if its initial settings contain SETTINGS_ENABLE_CONNECT_PROTOCOL SETTINGS=1.
Actual behavior
Request is rejected
io.netty.handler.codec.http2.Http2Exception$StreamException: Invalid HTTP/2 pseudo-header ':protocol' encountered.
at io.netty.handler.codec.http2.Http2Exception.streamError(Http2Exception.java:147)
at io.netty.handler.codec.http2.HpackDecoder.validate(HpackDecoder.java:393)
Suboptimal workaround is configuring server’s Http2ConnectionHandler
with http2Builder.validateHeaders(false)
Steps to reproduce
Minimal yet complete reproducer code (or URL to code)
https://github.com/jauntsdn/netty-websocket-http2/tree/feature/http2-protocol-header-reject
start ./channel_server.sh
start ./channel_client.sh
Netty version
4.1.51.Final
JVM version (e.g. java -version
)
OS version (e.g. uname -a
)
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
RFC 7540 - Hypertext Transfer Protocol Version 2 (HTTP/2)
HTTP/2 enables a more efficient use of network resources and a reduced ... Pseudo-header fields are only valid in the context in which...
Read more >TcpProxy improperly sets `:protocol=bytestream` for HTTP2 ...
TcpProxy improperly sets :protocol=bytestream for HTTP2: When using TunnelingConfig for an HTTP/2 tunnel, it send an out-of-spec psuedo header.
Read more >Working with HTTP/2 in Burp Suite - PortSwigger
Many servers now support HTTP/2. ... shows a more accurate representation of the headers and pseudo-headers that will be sent to the server....
Read more >Translating between HTTP/1 and HTTP/2 - HTTP Toolkit
HTTP/2 moves request and response metadata into so-called 'pseudo-headers'. These are headers, but prefixed with a colon, like :path (because in HTTP/1 ...
Read more >HTTP/2 | Node.js v19.2.0 Documentation
The node:http2 module provides an implementation of the HTTP/2 protocol. ... The :method and :path pseudo-headers are not specified within headers ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems this is fixed already by https://github.com/netty/netty/pull/11192 in a very straightforward way, closing
This might be reasonable to support with the Http2ConnectionHandler, but not from the Multiplex handler. Netty /is/ compliant with RFC 7540 which states: