Skip to content

fix: Only report http2 support if the http2 feature is enabled #144

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

Merged
merged 3 commits into from
Sep 29, 2021

Conversation

Marwes
Copy link
Contributor

@Marwes Marwes commented Feb 10, 2021

Fixes #143

src/connector.rs Outdated
Comment on lines 68 to 72
#[cfg(not(feature = "http2"))]
{
config.alpn_protocols = vec![b"http/1.1".to_vec()];
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think alpn_protocols should just be omitted if it only contains "http/1.1".

@g2p g2p mentioned this pull request Feb 11, 2021
@Arnavion
Copy link

hyper allows toggling http1 and http2 features independently. So you also need to provide a knob for the ALPN negotiation to only include "h2" and not "http/1.1" for the case where the client only supports HTTP/2 and not /1.1

@paolobarbolini
Copy link
Contributor

Any updates on this?

@djc djc merged commit 2c673c0 into rustls:master Sep 29, 2021
@djc
Copy link
Member

djc commented Sep 29, 2021

This makes sense to me, thanks!

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.

Don't force HTTP2 support
5 participants