From: Daniel Stenberg Date: Thu, 21 Jan 2021 06:58:36 +0000 (+0100) Subject: http: empty reply connection are not left intact X-Git-Tag: curl-7_75_0~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8710633ed64350dbcbc370f7104655e4a91690a;p=thirdparty%2Fcurl.git 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 --- diff --git a/lib/http.c b/lib/http.c index 055103430f..471efe3d3d 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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; }