From 89ab5f4380b9fd6507e0bc365310d88c82dd3de1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 21 Dec 2006 10:15:38 +0000 Subject: 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. --- lib/ftp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/ftp.c') 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++) { -- cgit v1.2.3