1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

http: empty reply connection are not left intact

... so mark the connection as closed in this condition to prevent that
verbose message to wrongly appear.

Reported-by: Matt Holt
Bug: https://twitter.com/mholt6/status/1352130240265375744
Closes #6503
This commit is contained in:
Daniel Stenberg 2021-01-21 07:58:36 +01:00
parent c977a6d0dc
commit e8710633ed
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1596,6 +1596,8 @@ CURLcode Curl_http_done(struct Curl_easy *data,
read from the HTTP server (that counts), this can't be right so we
return an error here */
failf(data, "Empty reply from server");
/* Mark it as closed to avoid the "left intact" message */
streamclose(conn, "Empty reply from server");
return CURLE_GOT_NOTHING;
}