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

HTTP/1.1 sent to h2 connection with native-tls-alpn #2204

Closed
lilydjwg opened this issue Mar 24, 2024 · 1 comment
Closed

HTTP/1.1 sent to h2 connection with native-tls-alpn #2204

lilydjwg opened this issue Mar 24, 2024 · 1 comment

Comments

@lilydjwg
Copy link

Code:

let _r = reqwest::get("https://www.google.com/").await.unwrap();

Cargo.toml:

reqwest = { version = "0.12.1", default-features = false, features = ["native-tls-alpn", "http2"] }

Result:

called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("www.google.com")), port: None, path: "/", query: None, fragment: None }, source: Error { kind: SendRequest, source: Some(hyper::Error(Parse(Version))) } }

ALPN has negotiated to use h2 and then an HTTP/1.1 request is sent. The server terminates the connection by a GO_AWAY frame.

With http2_prior_knowledge it works fine.

@lilydjwg
Copy link
Author

Oops, it's fixed by #2165.

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

No branches or pull requests

1 participant