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

h2 always reported in alpn_protocols #80

Closed
Diggsey opened this issue Jul 12, 2023 · 1 comment
Closed

h2 always reported in alpn_protocols #80

Diggsey opened this issue Jul 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Diggsey
Copy link

Diggsey commented Jul 12, 2023

config.alpn_protocols = vec![b"h2".to_vec(), b"http/1.1".to_vec()];

This is wrong as the axum server doesn't necessarily support http2.

@daxpedda
Copy link
Collaborator

I don't think there is currently a way for axum-server to not serve both protocols HTTP/2.
Internally Builder::serve_connection_with_upgrades() is used, so e.g. no matter if you use Builder::http2_only(), both HTTP/1 and HTTP/2 will be served.

Let me know if I'm wrong about that.

@daxpedda daxpedda closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants