diff --git a/lib/http.c b/lib/http.c index 08c2ea88f2f08551e43f6559b55d3fc024ee7045..bf71f89c2bec9e4038e22654dbc965f9a5887f83 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1832,7 +1832,9 @@ CURLcode Curl_http_done(struct connectdata *conn, if(status != CURLE_OK) return (status); - if(!conn->bits.retry && + if(!premature && /* this check is pointless is the DONE is done before the + entire operation is complete */ + !conn->bits.retry && ((http->readbytecount + data->req.headerbytecount - data->req.deductheadercount)) <= 0) {