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/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/http.c') diff --git a/lib/http.c b/lib/http.c index 0b537e45e..2f8b98e2e 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1527,8 +1527,8 @@ CURLcode Curl_http_done(struct connectdata *conn, if(!conn->bits.retry && ((http->readbytecount + - k->headerbytecount - - k->deductheadercount)) <= 0) { + conn->headerbytecount - + conn->deductheadercount)) <= 0) { /* If this connection isn't simply closed to be retried, AND nothing was read from the HTTP server (that counts), this can't be right so we return an error here */ -- cgit v1.2.3