aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-10-11 20:55:08 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-10-11 20:55:08 +0000
commit265c58611fe33b1ebc141a8909d69323421a18bf (patch)
tree02890a0beade5b81872d9a669e410bdac86eb54d
parent25c973a39e3a0d7a03c15cf4476ddf691e40ace1 (diff)
When we receive a "bad header" we must sure not to write down the data part
as well, as then we write the same data twice.
-rw-r--r--lib/transfer.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 1de4fccef..247e40286 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -817,12 +817,12 @@ CURLcode Curl_readwrite(struct connectdata *conn,
k->hbuflen);
k->badheader = FALSE; /* taken care of now */
}
-
- /* This switch handles various content encodings. If there's an
- error here, be sure to check over the almost identical code in
- http_chunk.c. 08/29/02 jhrg */
+ else {
+ /* This switch handles various content encodings. If there's an
+ error here, be sure to check over the almost identical code in
+ http_chunk.c. 08/29/02 jhrg */
#ifdef HAVE_LIBZ
- switch (k->content_encoding) {
+ switch (k->content_encoding) {
case IDENTITY:
#endif
/* This is the default when the server sends no
@@ -847,8 +847,9 @@ CURLcode Curl_readwrite(struct connectdata *conn,
"content encodings.");
result = CURLE_BAD_CONTENT_ENCODING;
break;
- }
+ }
#endif
+ }
if(result)
return result;