-
-
Notifications
You must be signed in to change notification settings - Fork 15.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
Make Http2UnknownFrame extend Http2StreamFrame rather than Http2Frame #7969
Comments
@Bennett-Lynch let it extend I think I would leave the |
…e with Http2MultiplexCodec. Motivation: This is a followup for #7860. In the fix for #7860 we only partly fixed the problem as Http2UnknownFrame did not correctly extend HttpStreamFrame and so only worked when using the Http2FrameCodec. We need to have it extend HttpStreamFrame as otherwise Http2MultiplexCodec will reject to handle it correctly. Modifications: - Let Http2UnknownFrame extend HttpStreamFrame - Add unit tests for writing and reading Http2UnkownFrame instances when the Http2MultiplexCodec is used. Result: Fixes #7969.
@Bennett-Lynch I had a bit time this morning so I just did it myself and adding unit tests: PTAL |
Thanks, @normanmaurer -- change looks good to me. Fine with using |
@Bennett-Lynch because its redundant as it exists in the flags already (and you can have other flags as well). |
…e with Http2MultiplexCodec. (#7976) Motivation: This is a followup for #7860. In the fix for #7860 we only partly fixed the problem as Http2UnknownFrame did not correctly extend HttpStreamFrame and so only worked when using the Http2FrameCodec. We need to have it extend HttpStreamFrame as otherwise Http2MultiplexCodec will reject to handle it correctly. Modifications: - Let Http2UnknownFrame extend HttpStreamFrame - Add unit tests for writing and reading Http2UnkownFrame instances when the Http2MultiplexCodec is used. Result: Fixes #7969.
This is a follow-up issue regarding: #7860
Expected behavior
Writing an
Http2UnknownFrame
to a child channel will be written to the parent channel and underlying HTTP/2 connection viaHttp2MultiplexCodec
.When
Http2MultiplexCodec
reads anHttp2UnknownFrame
, it will be propagated to the correct child channel.Actual behavior
Http2MultiplexCodec
rejects the write sinceHttp2UnknownFrame
is not aninstanceof Http2StreamFrame
.netty/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MultiplexCodec.java
Lines 1021 to 1028 in dfeb4b1
Http2MultiplexCodec
does not propagate reads to child channels sinceHttp2UnknownFrame
is not aninstanceof Http2StreamFrame
.netty/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MultiplexCodec.java
Lines 219 to 221 in dfeb4b1
Proposal
Http2UnknownFrame
should extendHttp2StreamFrame
, rather thanHttp2Frame
, as it already defines the two stream-related methods that the two interfaces differ in.Should it possibly declare an
isEndStream
method as well, similar toHttp2DataFrame
?The text was updated successfully, but these errors were encountered: