diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-01-21 07:58:36 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-01-21 16:39:35 +0100 |
commit | e8710633ed64350dbcbc370f7104655e4a91690a (patch) | |
tree | fc567202607cf762b2dbff6402b21f532a2742c2 /lib/http.c | |
parent | c977a6d0dc2b124168af0746915564a371427ee0 (diff) | |
download | curl-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
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 2 |
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; } |