0

I tried downloading an Aeroméxico news item using

curl "https://www.aeromexico.com/en-us/am-news/new-Rome-route" -s --trace-ascii -

But it reports

== Info: HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)

Which options do I need to supply to curl to have it try all available protocols? HTTP2 doesn't seem to be working.

1 Answer 1

2

You can’t ask curl to try all available protocols for a single request, but you can force it to use a specific version of HTTP:

curl --http1.1 "https://www.aeromexico.com/en-us/am-news/new-Rome-route" -s --trace-ascii -

The available variants are --http1.0 (or -0), --http1.1, --http2, and --http3.

The similar --http0.9 option doesn’t force HTTP/0.9, it only tells curl to accept 0.9 (headerless) connections.

2
  • On curl v7.88.1, it still seems to use HTTP2 if I supply --http0.9. Why? Commented Jul 21, 2024 at 18:23
  • Ah, --http0.9 is different, it doesn’t force 0.9, it only allows it. Commented Jul 21, 2024 at 18:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.