reactor-netty icon indicating copy to clipboard operation
reactor-netty copied to clipboard

Wrong Http protocol logged for reactor-netty-http client

Open akhiljain-rabo opened this issue 1 year ago • 3 comments

Fix: https://github.com/reactor/reactor-netty/pull/3487 Does not fix issue for http client. Still Http1.1 version is logged instead of H2. 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:

akhiljain-rabo avatar Nov 27 '24 16:11 akhiljain-rabo

@akhiljain-rabo The fix was related to ensure that the API returns the correct protocol version, not what is printed to the logs. We plan some refactoring in that area and it will be delivered in the next months.

violetagg avatar Nov 27 '24 17:11 violetagg

thanks for the consideration...

akhiljain-rabo avatar Nov 27 '24 17:11 akhiljain-rabo

This issue is duplicate to #3080 Let's keep this one opened in order to track our future work in that area.

violetagg avatar Nov 27 '24 17:11 violetagg