Daniel and Ray, thanks for your advice. I am fine with the current behaviour and was looking for this only for a test edge case.
And I learned a new curl option instead! "-w", short for "--wondrous" I assume! Thanks, Stefan > Am 29.08.2018 um 23:11 schrieb Daniel Stenberg <dan...@haxx.se>: > > On Wed, 29 Aug 2018, 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? > > We don't really have any logic to make it fail if won't end up using HTTP/2. > > A work-around would be to add that check yourself outside of curl. Something > similar to this with the command line tool: > > ver=`curl localhost -w '%{http_version}\n' -so /dev/null` > if test "$ver" != "2"; then > echo "did not work" > fi > > -- > > / daniel.haxx.se ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html