lib: always use Curl_1st_fatal instead of Curl_1st_err

Curl_1st_err() does not return the second error if the first result is
CURLE_AGAIN. This may cause errors to not become noticeable when they
should be.

Replace all use of Curl_1st_err() with Curl_1st_fatal(), which handles
CURLE_AGAIN as a not-a-real-error case.

Closes #20980
This commit is contained in:
Stefan Eissing 2026-03-18 11:37:18 +01:00 committed by Daniel Stenberg
parent 77c5470147
commit 41aaac61e2
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 11 additions and 21 deletions

View file

@ -4169,7 +4169,7 @@ static CURLcode http_on_response(struct Curl_easy *data,
out:
if(last_hd) {
/* if not written yet, write it now */
result = Curl_1st_err(
result = Curl_1st_fatal(
result, http_write_header(data, last_hd, last_hd_len));
}
if(conn_changed) {