curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: only http2 mode?

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
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.

[1]: https://curl.haxx.se/docs/manpage.html#--http2-prior-knowledge

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-08-29