summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-01-21 07:58:36 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-21 16:39:35 +0100
commite8710633ed64350dbcbc370f7104655e4a91690a (patch)
treefc567202607cf762b2dbff6402b21f532a2742c2
parentc977a6d0dc2b124168af0746915564a371427ee0 (diff)
downloadcurl-e8710633ed64350dbcbc370f7104655e4a91690a.tar.gz
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
-rw-r--r--lib/http.c2
1 files changed, 2 insertions, 0 deletions
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;
}