Buy commercial curl support from
WolfSSL. 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 himself.
Re: HTTP status and error codes
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 4 Apr 2024 23:34:16 +0200 (CEST)
On Thu, 4 Apr 2024, R C via curl-library wrote:
> I can read the HTTP status with CURLINFO_RESPONSE_CODE, can the actual
> status/error message also be printed? (are the messages available in
> libcurl?
There is no way to get the so called "reason-phrase" using the API, no. You
can extract it yourself using the header callback if you truly want to.
RFC 9112 says this:
A client SHOULD ignore the reason-phrase content because it is not a reliable
channel for information
HTTP/2 and HTTP/3 dropped the reason phrase completely from the protocol for
that reason.
Date: Thu, 4 Apr 2024 23:34:16 +0200 (CEST)
On Thu, 4 Apr 2024, R C via curl-library wrote:
> I can read the HTTP status with CURLINFO_RESPONSE_CODE, can the actual
> status/error message also be printed? (are the messages available in
> libcurl?
There is no way to get the so called "reason-phrase" using the API, no. You
can extract it yourself using the header callback if you truly want to.
RFC 9112 says this:
A client SHOULD ignore the reason-phrase content because it is not a reliable
channel for information
HTTP/2 and HTTP/3 dropped the reason phrase completely from the protocol for
that reason.
-- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://curl.se/support.html
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2024-04-04