Skip to content
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

Adds support for HTTP2 via axum. #119

Merged
merged 1 commit into from
Dec 2, 2021
Merged

Adds support for HTTP2 via axum. #119

merged 1 commit into from
Dec 2, 2021

Conversation

novemberkilo
Copy link
Contributor

Closes #16

// @houqp

roapi-http/Cargo.toml Outdated Show resolved Hide resolved
@novemberkilo novemberkilo changed the title Adds support for HTTP2 via hyper. Adds support for HTTP2 via axum. Dec 2, 2021
@houqp
Copy link
Member

houqp commented Dec 2, 2021

Thanks @novemberkilo , is the feature gate all we need to turn on this feature? I am guessing we still only need to bind to a single port and the client will negotiate with the server to use either HTTP or HTTP2?

@novemberkilo
Copy link
Contributor Author

I am guessing we still only need to bind to a single port and the client will negotiate with the server to use either HTTP or HTTP2?

I'll check the hyper docs and also do some ad-hoc testing with curl locally. I'll report back.

@novemberkilo
Copy link
Contributor Author

@houqp locally testing with curl is not yielding anything definitive. However, I see

And users who want HTTP/2 can opt-in, knowing they need a newer compiler version, but setting hyper = { version = "0.11", features = ["http2"] }.
Besides opting in, there wouldn't be a need to do anything else: the client and server would both be able to speak HTTP/2 automatically.

From the issue commentary for when HTTP/2 was added to hyper hyperium/hyper#304 (comment)

I've also got one of the contributors making this assertion here

@houqp houqp merged commit ea04a92 into roapi:main Dec 2, 2021
@houqp
Copy link
Member

houqp commented Dec 2, 2021

Thanks @novemberkilo for the deepdive on this :) I filed #120 as a follow up issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP2 Support
2 participants