curl / Mailing Lists / curl-library / Single Mail


Re: only http2 mode?

From: Ray Satiro via curl-library <>
Date: Wed, 29 Aug 2018 10:44:18 -0400

On 8/29/2018 9:38 AM, Stefan Eissing via curl-library wrote:
> In Tests I'd like to make a curl command line requests that should only succeed for HTTP/2. Is that possible? '--no-http1.1' does not seem to have an effect. Or maybe I am holding it wrong?

The --http options are not boolean so no- won't work. For non-TLS you
can use --http2-prior-knowledge [1] to send HTTP2 to the server
outright. It is undocumented that it happens to work the same for TLS.
TLS libcurl will still send http1.1 in the ALPN. If the server agrees
ALPN http1.1 or no ALPN libcurl sends the request anyway. I'm not sure
if that was intended and we should document it.


Received on 2018-08-29