Skip to content
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

Ensure HttpInfos#version returns the correct protocol #3487

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

violetagg
Copy link
Member

Fixes #3475

@violetagg violetagg added the type/bug A general bug label Oct 28, 2024
@violetagg violetagg added this to the 1.1.24 milestone Oct 28, 2024
Copy link
Member

@chemicL chemicL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand for 1.2.x the implementation would need to also consider H3 so a boolean isHttp2 probably can't be used there, but for 1.1.x it looks this patch provides what's needed 👍

@violetagg
Copy link
Member Author

I understand for 1.2.x the implementation would need to also consider H3 so a boolean isHttp2 probably can't be used there, but for 1.1.x it looks this patch provides what's needed 👍

We have Http3ServerOperations so we will override those methods as we do for local/remote address https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/server/Http3ServerOperations.java

For the client - yes we will need something else.

@violetagg violetagg merged commit 9e70766 into 1.1.x Oct 29, 2024
14 checks passed
@violetagg violetagg deleted the issue-3475 branch October 29, 2024 16:37
violetagg added a commit that referenced this pull request Oct 29, 2024
violetagg added a commit that referenced this pull request Oct 29, 2024
@akhiljain-rabo
Copy link

this is still not fixed for Client version: 1.1.24
Example to reproduce: Run sample app with debug.

https://github.com/reactor/reactor-netty/blob/main/reactor-netty-examples/src/main/java/reactor/netty/examples/documentation/http/client/http2/H2Application.java

17:47:17.564 [reactor-http-nio-2] DEBUG reactor.netty.http.client.HttpClientConfig - [14a533a2, L:/192.168.2.17:61029 - R:example.com/93.184.215.14:443](H2 - -1) Initialized HTTP/2 stream pipeline AbstractHttp2StreamChannel$3{(reactor.left.h2ToHttp11Codec = io.netty.handler.codec.http2.Http2StreamFrameToHttpObjectCodec), (reactor.left.httpTrafficHandler = reactor.netty.http.client.Http2StreamBridgeClientHandler), (reactor.right.reactiveBridge = reactor.netty.channel.ChannelOperationsHandler)}
17:47:17.568 [reactor-http-nio-2] DEBUG reactor.netty.http.client.HttpClientConnect - [14a533a2/1-1, L:/192.168.2.17:61029 - R:example.com/93.184.215.14:443] Handler is being applied: {uri=https://example.com/, method=GET}
17:47:17.580 [reactor-http-nio-2] DEBUG reactor.netty.http.client.Http2ConnectionProvider - [14a533a2/1-1, L:/192.168.2.17:61029 - R:example.com/93.184.215.14:443] Stream opened, now: 1 active streams and 100 max active streams.
17:47:17.581 [reactor-http-nio-2] DEBUG io.netty.channel.DefaultChannelPipeline - Discarded inbound message DefaultHttp2SettingsAckFrame that reached at the tail of the pipeline. Please check your pipeline configuration.
17:47:17.581 [reactor-http-nio-2] DEBUG io.netty.channel.DefaultChannelPipeline - Discarded message pipeline : [reactor.left.sslHandler, reactor.left.h2Flush, reactor.left.httpCodec, reactor.left.h2MultiplexHandler, DefaultChannelPipeline$TailContext#0]. Channel : [id: 0x14a533a2, L:/192.168.2.17:61029 - R:example.com/93.184.215.14:443].
17:47:17.696 [reactor-http-nio-2] DEBUG reactor.netty.http.client.HttpClientOperations - [14a533a2/1-1, L:/192.168.2.17:61029 - R:example.com/93.184.215.14:443] Received response (auto-read:false) : RESPONSE(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK

age:

@violetagg
Copy link
Member Author

@akhiljain-rabo The fix was related to ensure that the API returns the correct protocol version, not what is printed to the logs.

@akhiljain-rabo
Copy link

I have opened a new issue for that. It took quite some time to understand that connections are still made over H2 but had some other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP protocol version reported by the server is HTTP/1.1 even for HTTP/2-only servers
3 participants