Use HTTP/1.1 when ALPN protocol is not specified - #162
Merged
Conversation
alejandroaires
approved these changes
Aug 21, 2026
Collaborator
Author
|
@copilot resolve the merge conflicts in this pull request |
…T-HTTP1-FALLBACK # Conflicts: # src/main/java/com/blazemeter/jmeter/http2/core/HTTP2JettyClient.java Co-authored-by: 3dgiordano <797057+3dgiordano@users.noreply.github.com>
Merge conflicts resolved in commit |
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.
This pull request introduces robust handling for servers that do not support HTTP/2, particularly when TLS ALPN negotiation fails and the server responds with HTTP/1.1. The changes ensure that such origins are remembered and future requests avoid attempting HTTP/2, improving efficiency and reliability, especially in multi-address scenarios. Additionally, the implementation prevents repeated failed HTTP/2 attempts for the same origin and adds comprehensive tests to validate the new behavior.
HTTP/2 Rejection Detection and Caching:
HTTP2JettyClient.java,CustomHttpSessionListenerPromise.java). [1] [2] [3]CustomClientConnectionFactoryOverHTTP2.java). [1] [2] [3]Connection Handling Improvements:
HTTP2JettyClient.java,RecordingHttpClientTransportDynamic).Fallback Logic Enhancements:
HTTP2JettyClient.java).Testing:
AlpnAbsentHttp2RejectedTestto reproduce and verify the handling of origins that do not negotiate ALPN, including scenarios with multiple resolved addresses and ensuring that repeated HTTP/2 attempts are avoided (AlpnAbsentHttp2RejectedTest.java).Dependency and Import Updates:
HTTP2JettyClient.java,CustomClientConnectionFactoryOverHTTP2.java,CustomHttpSessionListenerPromise.java). [1] [2] [3] [4]These changes significantly improve the client's resilience and performance when interacting with servers that do not support HTTP/2, especially in complex network environments.