diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-02-02 14:49:54 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-02-02 14:49:54 +0000 |
commit | b84eaff1d57754e9d154fa7fc7bf941c9e430a31 (patch) | |
tree | 09bfd8de2f9df53e92736d5f5ea5151d4f0d3cd9 /lib/http.c | |
parent | 9eb6fc1fb6442644d7284a6d095f5bb9f0296840 (diff) |
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
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/http.c b/lib/http.c index fea11f59a..3bab60df3 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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; } |