reqwest icon indicating copy to clipboard operation
reqwest copied to clipboard

Document that http2_prior_knowledge requires explicit use of use_rustls_tls on ClientBuilder.

Open Protryon opened this issue 4 years ago • 1 comments

At present, reqwest only sends ALPN when rustls is used -- this effectively breaks http2_prior_knowledge when used with TLS, which is it's primary use case if the user does not use rustls.

Simply adding the rustls-tls feature to reqwest is insufficient to use rustls which can lead to confusion as the error message encountered when not using rustls is as follows:

reqwest::Error { kind: Request, url: "https://google.com/", source: hyper::Error(Http2, Error { kind: Proto(FRAME_SIZE_ERROR) }) }

When calling the use_rustls_tls function on the ClientBuilder, HTTP2 connections over TLS with http2_prior_knowledge works as expected.

This would be great to document or even raise a specific error when using http2_prior_knowledge with HTTPS and rustls is not enabled for the specific connection.

Protryon avatar Mar 22 '20 14:03 Protryon

Thank you for this. I was wondering for like 15 minutes why it doesn't work.

bugproof avatar Jul 17 '22 21:07 bugproof