From 7b51b2f12834f09763d4e53cd1737d450d46cd9c Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Fri, 11 Apr 2003 16:23:43 +0000
Subject: [PATCH] Nic Hines fixed this bug when deflate or gzip contents were
 downloaded using chunked encoding.

---
 lib/http_chunks.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/http_chunks.c b/lib/http_chunks.c
index 6fea493ac..ca9b55366 100644
--- a/lib/http_chunks.c
+++ b/lib/http_chunks.c
@@ -186,10 +186,14 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
           break;
 
         case DEFLATE: 
+          /* update conn->keep.str to point to the chunk data. */
+          conn->keep.str = datap;
           result = Curl_unencode_deflate_write(conn->data, &conn->keep, piece);
           break;
 
         case GZIP:
+          /* update conn->keep.str to point to the chunk data. */
+          conn->keep.str = datap;
           result = Curl_unencode_gzip_write(conn->data, &conn->keep, piece);
           break;
 
-- 
2.40.0