Add http/2 support to HTTPBin#382
Merged
Uh oh!
There was an error while loading. Please reload this page.
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 PR adds http/2 support to the
HTTPBintest utility.Note regarding semver:
This PR adds
swift-nio-http2as a dependency.Modifications
HTTPBinchannelPromise: EventLoopPromise<Channel>? = nilwas only used once (intestUploadStreamingBackpressure).connectionDelay: TimeAmount = .seconds(0)was never usedmaxChannelAge: TimeAmount? = nilwas never usedssl: Bool = false, compress: Bool = false, refusesConnections: Bool = falsehave moved into aModeenum. The mode might be.http1_1(ssl: Bool, compress: Bool),.http2(compress: Bool), or.refusehttp/2(not used in any test yet, however I verified the support with curl locally.)HTTPBinhandler continues to use theHTTPBinHandler.Result
http/2Follow ups
ServerQuiescingHelperto ensure that all connections are closed when the test ends. However we often seem to leak connections when we cancel tasks. This would make our CI very flaky. I hope to land this at a later point once all connection and connection pool improvements have landed (See [RFC] ConnectionPool rewrite and http/2 support #376).