curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

status reason-phrase missing for H2

From: Yang Yu via curl-users <curl-users_at_lists.haxx.se>
Date: Fri, 23 Aug 2024 11:44:07 -0500

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
Received on 2024-08-23