status reason-phrase missing for H2

Yang Yu via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <CAFwKRnQ86if97y-PpQRj6XPiG956TEEZ1tB9LtcH5vKfiTkASQ@mail.gmail.com>
Hi,

Compare HTTP 1.1 response header output with H/2

$ curl -I http://www.http2demo.io/
HTTP/1.1 200 OK

$ curl -I https://www.cloudflare.com
HTTP/2 200

For H2, the reason phrase is not shown in curl output.

The status line has "status-line = HTTP-version SP status-code SP
reason-phrase CRLF"
https://www.rfc-editor.org/rfc/rfc7230#section-3.1.2

For some response codes like 400, the reason phrase could be
significant (not all 400s are the same). But I can't seem to find a
way to get curl to show the reason phrase for H2 responses.

Is it possible to make the status line output consistent across HTTP
versions? Or at least a way to retrieve the reason phrase.

This might be related to https://github.com/curl/curl/issues/6615

Thanks.


Yang
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.