aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-12-21 10:15:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-12-21 10:15:38 +0000
commit89ab5f4380b9fd6507e0bc365310d88c82dd3de1 (patch)
tree21417e0df4f89a559011c30f4d88b2d56057a82e /lib/ftp.c
parent439b84c78222706c54a878cbc4238a2580a228b1 (diff)
Robson Braga Araujo reported bug #1618359
(http://curl.haxx.se/bug/view.cgi?id=1618359) and subsequently provided a patch for it: when downloading 2 zero byte files in a row, curl 7.16.0 enters an infinite loop, while curl 7.16.1-20061218 does one additional unnecessary request. Fix: During the "Major overhaul introducing http pipelining support and shared connection cache within the multi handle." change, headerbytecount was moved to live in the Curl_transfer_keeper structure. But that structure is reset in the Transfer method, losing the information that we had about the header size. This patch moves it back to the connectdata struct.
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 7175c99a7..0f19bca58 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -329,7 +329,7 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
* line */
int i;
- k->headerbytecount += gotbytes;
+ conn->headerbytecount += gotbytes;
ftpc->nread_resp += gotbytes;
for(i = 0; i < gotbytes; ptr++, i++) {
@@ -562,7 +562,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
* line */
int i;
- k->headerbytecount += gotbytes;
+ conn->headerbytecount += gotbytes;
*nreadp += gotbytes;
for(i = 0; i < gotbytes; ptr++, i++) {