-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fetch
can't connect to HTTP/2-only servers
#12517
Comments
@andreubotella What happens if you set http2_prior_knowledge on the client builder? |
The fetch does succeed if you do that. But of course, that's not something that can be enabled by default (although maybe it could be an option in |
Sure. That suggests the issue stems from ALPN. |
This also affects servers which support both HTTP/1.1 and HTTP/2, since It seems like this regressed in #11491. |
`fetch()` and client-side websocket used to support HTTP/2, but this regressed in denoland#11491. This patch reenables it by explicitly adding `h2` and `http/1.1` to the list of ALPN protocols on the HTTP and websocket clients. Fixes denoland#12517.
This came up when working on #12472, since WPT's HTTP/2 server on port 9000 is HTTP/2-only. It also seems to be the cause of #12208.
Here's a test case – run it on a checkout of the Deno repo.
reqwest
with rustls does support connecting to HTTP/2-only servers, as shown by the following Rust sample:The configuration of
reqwest
that Deno uses for fetching is more complicated than this, however, and I'm not sure if this is a bug with Deno's configuration, or a bug withreqwest
.The text was updated successfully, but these errors were encountered: