Skip to content

include.d: explain headers not printed prior 7.75.0#11822

Closed
pszlazak wants to merge 2 commits intocurl:masterfrom
pszlazak:master
Closed

include.d: explain headers not printed prior 7.75.0#11822
pszlazak wants to merge 2 commits intocurl:masterfrom
pszlazak:master

Conversation

@pszlazak
Copy link
Contributor

@pszlazak pszlazak commented Sep 8, 2023

Prior to 7.75.0 response headers were not printed if -f/--fail was used and an error was reported by server.

This is NOK example for curl 7.74.0:

$ curl -q "http://httpbin.org/status/500" --include --fail
curl: (22) The requested URL returned error: 500 INTERNAL SERVER ERROR

This is OK example for curl 8.1.2:

$ curl -q "http://httpbin.org/status/500" --include --fail
HTTP/1.1 500 INTERNAL SERVER ERROR
Server: gunicorn/19.9.0
Date: Fri, 08 Sep 2023 15:15:43 GMT
Connection: keep-alive
Content-Type: text/html; charset=utf-8
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Length: 0

curl: (22) The requested URL returned error: 500

This behavior was fixed in ab525c0 (precedes 7.75.0).

pszlazak and others added 2 commits September 8, 2023 23:15
Prior to 7.75.0 response headers were not printed
if -f/--fail was used and an error was reported by
server.
This was fixed in ab525c0 (precedes 7.75.0).

Closes #11822
Co-authored-by: Daniel Stenberg <daniel@haxx.se>
@pszlazak pszlazak marked this pull request as ready for review September 9, 2023 20:58
@bagder
Copy link
Member

bagder commented Sep 9, 2023

Thanks!

@bagder bagder closed this in ba30c5e Sep 9, 2023
ptitSeb pushed a commit to wasix-org/curl that referenced this pull request Sep 25, 2023
Prior to 7.75.0 response headers were not printed if -f/--fail was used
and an error was reported by server.  This was fixed in ab525c0
(precedes 7.75.0).

Closes curl#11822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants