Fix OneTimeReadTimeoutHandler removed by TLS handshake for 100-contin…#6803
Open
Fix OneTimeReadTimeoutHandler removed by TLS handshake for 100-contin…#6803
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



…ue requests
Motivation and Context
OneTimeReadTimeoutHandlerwas added at the front of the pipeline viaaddFirst, placing it beforeSslHandler. During the TLS handshake on new connections, raw encrypted bytes arrived aschannelReadevents and caused the handler to remove itself before the HTTP100 Continueresponse could arrive. This left no read timeout handler active, causing requests withExpect: 100-continueto hang indefinitely when no response is received.Modifications
OneTimeReadTimeoutHandlerpipeline position fromaddFirsttoaddBefore(HttpStreamsClientHandler)inNettyRequestExecutor.writeRequest(), so the handler only sees decoded HTTP messages and is not affected by TLS handshake dataExpect100ContinueReadTimeoutTest— an integration test with a slow-handshake TLS server that never responds to100-continue. The test hangs without the fix and passes with it.Testing
Expect100ContinueReadTimeoutTest— verified it fails (hangs) pre-fix and passes post-fixExisting tests pass
Added unit tests
Ran existing tests
Manual testing performed
Types of changes
Checklist
mvn clean install -pl :netty-nio-clientsucceedsLicense