-
Notifications
You must be signed in to change notification settings - Fork 123
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
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
HTTPBin
test utility.Note regarding semver:
This PR adds
swift-nio-http2
as a dependency.Modifications
HTTPBin
channelPromise: EventLoopPromise<Channel>? = nil
was only used once (intestUploadStreamingBackpressure
).connectionDelay: TimeAmount = .seconds(0)
was never usedmaxChannelAge: TimeAmount? = nil
was never usedssl: Bool = false, compress: Bool = false, refusesConnections: Bool = false
have moved into aMode
enum. The mode might be.http1_1(ssl: Bool, compress: Bool)
,.http2(compress: Bool)
, or.refuse
http/2
(not used in any test yet, however I verified the support with curl locally.)HTTPBin
handler continues to use theHTTPBinHandler
.Result
http/2
Follow ups
ServerQuiescingHelper
to 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).