-
Notifications
You must be signed in to change notification settings - Fork 138
Add http/2 support to HTTPBin #382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add http/2 support to HTTPBin #382
Conversation
glbrntt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good aside from a typo.
| private func syncAddHTTPProxyHandlers( | ||
| to channel: Channel, | ||
| connectionID: Int, | ||
| expectedAuthroization: String? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: expectedAuthroization -> expectedAuthorization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
2207098 to
c4c7212
Compare
|
@swift-server-bot test this please |
Co-authored-by: David Evans <[email protected]>
4653af5 to
3bf080c
Compare
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).