summaryrefslogtreecommitdiff
path: root/lib/http_chunks.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-08-03 22:18:14 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-08-03 22:18:14 +0000
commitf72ba7f79d3eb261f922d24072409ee300402059 (patch)
treef9707cf1236567c9cd8cf3e4ab7555d60efe4347 /lib/http_chunks.c
parent296046510bc213090ea9e69a7314abb79f4d792e (diff)
downloadcurl-f72ba7f79d3eb261f922d24072409ee300402059.tar.gz
Mark Fletcher provided an excellent bug report that identified a problem
with FOLLOWLOCATION and chunked transfer-encoding, as libcurl would not properly ignore the body contents of 3XX response that included the Location: header.
Diffstat (limited to 'lib/http_chunks.c')
-rw-r--r--lib/http_chunks.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/http_chunks.c b/lib/http_chunks.c
index b0309fec8..ca3599ad0 100644
--- a/lib/http_chunks.c
+++ b/lib/http_chunks.c
@@ -102,8 +102,9 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
size_t length,
size_t *wrote)
{
- CURLcode result;
+ CURLcode result=CURLE_OK;
struct Curl_chunker *ch = &conn->proto.http->chunk;
+ struct Curl_transfer_keeper *k = &conn->keep;
int piece;
*wrote = 0; /* nothing yet */
@@ -180,8 +181,9 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
switch (conn->keep.content_encoding) {
case IDENTITY:
#endif
- result = Curl_client_write(conn->data, CLIENTWRITE_BODY, datap,
- piece);
+ if(!k->ignorebody)
+ result = Curl_client_write(conn->data, CLIENTWRITE_BODY, datap,
+ piece);
#ifdef HAVE_LIBZ
break;