http: acknowledge a returned error code

... and do not overwrite it with a new value that could then hide the
problem.

Spotted by CodeSonar

Closes #13434
This commit is contained in:
Daniel Stenberg 2024-04-20 23:15:00 +02:00
parent 5fa594ab7b
commit 727c946d82
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -2238,9 +2238,11 @@ CURLcode Curl_http_req_complete(struct Curl_easy *data,
/* end of headers */
result = Curl_dyn_addn(r, STRCONST("\r\n"));
Curl_pgrsSetUploadSize(data, req_clen);
if(announced_exp100)
result = http_exp100_add_reader(data);
if(!result) {
Curl_pgrsSetUploadSize(data, req_clen);
if(announced_exp100)
result = http_exp100_add_reader(data);
}
out:
if(!result) {