Execute curl with the option --no-http2. E.g.: $ curl --no-http2 example.com
I expected the following
I expect curl to continue running. However, instead curl returns an error:
curl: (1) Unsupported protocol
My version of curl is built without HTTP/2 support. However, the binary should still support the --no-http2 flag without any issues. The use case for this is usage of curl in a script where one wants to avoid a HTTP/2 connection. Such a script ends up failing on systems where curl is built without HTTP/2 support anyways.
I can see how you want this, but this option is actually not a boolean so there is no "opposite". To get what you want, you can use the - - http1.1 option instead.
We should still improve the parser/error message for this use...
bagder
changed the title
Curl doesn't like --no-http2 when HTTP/2 is not compiled in
The --no- prefix for non-booleans command line options is silently ignored
Apr 30, 2017
I did this
Execute curl with the option
--no-http2
. E.g.:$ curl --no-http2 example.com
I expected the following
I expect
curl
to continue running. However, instead curl returns an error:My version of curl is built without HTTP/2 support. However, the binary should still support the
--no-http2
flag without any issues. The use case for this is usage of curl in a script where one wants to avoid a HTTP/2 connection. Such a script ends up failing on systems where curl is built without HTTP/2 support anyways.curl/libcurl version
operating system
Arch Linux
The text was updated successfully, but these errors were encountered: