From e8710633ed64350dbcbc370f7104655e4a91690a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 21 Jan 2021 07:58:36 +0100 Subject: [PATCH] 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 --- lib/http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/http.c b/lib/http.c index 055103430..471efe3d3 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; }