aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2005-02-06 12:43:40 +0000
committerGisle Vanem <gvanem@broadpark.no>2005-02-06 12:43:40 +0000
commit7b23eff9cf32d498b8b04b5a983f1b26e2eb5795 (patch)
treeca41bd2b3ab599f77890d5e26e98cc146bf45176
parent67ff8e3ea36a1c0c2077a9c9b99a34c9fdd715b6 (diff)
Preserve previous status in Curl_http_done().
-rw-r--r--lib/http.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/http.c b/lib/http.c
index 2618c325f..3a7af8f6e 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1274,7 +1274,6 @@ CURLcode Curl_http_done(struct connectdata *conn,
{
struct SessionHandle *data;
struct HTTP *http;
- (void)status; /* no use for us */
data=conn->data;
http=conn->proto.http;
@@ -1291,7 +1290,7 @@ CURLcode Curl_http_done(struct connectdata *conn,
free(buff->buffer);
free(buff);
- http->send_buffer = NULL; /* cleaer the pointer */
+ http->send_buffer = NULL; /* clear the pointer */
}
if(HTTPREQ_POST_FORM == data->set.httpreq) {
@@ -1307,6 +1306,9 @@ CURLcode Curl_http_done(struct connectdata *conn,
else if(HTTPREQ_PUT == data->set.httpreq)
conn->bytecount = http->readbytecount + http->writebytecount;
+ if (status != CURLE_OK)
+ return (status);
+
if(!conn->bits.retry &&
((http->readbytecount +
conn->headerbytecount -