From: Gisle Vanem Date: Sun, 6 Feb 2005 12:43:40 +0000 (+0000) Subject: Preserve previous status in Curl_http_done(). X-Git-Tag: before_ftp_statemachine~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b23eff9cf32d498b8b04b5a983f1b26e2eb5795;p=thirdparty%2Fcurl.git Preserve previous status in Curl_http_done(). --- diff --git a/lib/http.c b/lib/http.c index 2618c325f2..3a7af8f6e9 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 -