Repository navigation
Use HTTP/1.1 for registry requests - #948
Open
danielsyauqi wants to merge 1 commit into
Open
danielsyauqi wants to merge 1 commit into
danielsyauqi wants to merge 1 commit into
Conversation
Registry endpoints can advertise HTTP/2 through a reverse proxy while their backend only supports HTTP/1.1. Configure registry clients for HTTP/1.1 and cover ALPN negotiation with a TLS regression test.
This branch has not been deployed
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.
Summary
Configure registry and token requests to use HTTP/1.1. A self-hosted registry can sit behind a TLS proxy that advertises HTTP/2 even though the registry backend only speaks HTTP/1.1. Negotiating HTTP/2 in that setup can produce a 421 response or a closed connection before an HTTP response arrives.
Add a TLS regression test whose server advertises both
h2andhttp/1.1, then checks that the registry ping arrives as an HTTP/1.1 request.Related: apple/container#2272
Testing
swift test --filter RealmRequestTests(6 tests passed)make checkmake containerization