set the 'retry' bit to TRUE when the connection is about to be retried,

this allows the HTTP code to *not* return a failure just because no data
has been received from the server
This commit is contained in:
Daniel Stenberg
2004-02-02 14:49:54 +00:00
parent 9eb6fc1fb6
commit b84eaff1d5
4 changed files with 20 additions and 3 deletions

View File

@@ -1028,9 +1028,11 @@ CURLcode Curl_http_done(struct connectdata *conn)
else if(HTTPREQ_PUT == data->set.httpreq)
conn->bytecount = http->readbytecount + http->writebytecount;
if(0 == (http->readbytecount + conn->headerbytecount)) {
/* nothing was read from the HTTP server, this can't be right
so we return an error here */
if(!conn->bits.retry &&
!(http->readbytecount + conn->headerbytecount)) {
/* If this connection isn't simply closed to be retried, AND nothing was
read from the HTTP server, this can't be right so we return an error
here */
failf(data, "Empty reply from server");
return CURLE_GOT_NOTHING;
}