diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-12-21 10:15:38 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-12-21 10:15:38 +0000 |
commit | 89ab5f4380b9fd6507e0bc365310d88c82dd3de1 (patch) | |
tree | 21417e0df4f89a559011c30f4d88b2d56057a82e /lib/urldata.h | |
parent | 439b84c78222706c54a878cbc4238a2580a228b1 (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/urldata.h')
-rw-r--r-- | lib/urldata.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/urldata.h b/lib/urldata.h index 7f2279e96..5953779ce 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -534,13 +534,6 @@ struct Curl_transfer_keeper { curl_off_t bytecount; /* total number of bytes read */ curl_off_t writebytecount; /* number of bytes written */ - long headerbytecount; /* only count received headers */ - long deductheadercount; /* this amount of bytes doesn't count when we check - if anything has been transfered at the end of - a connection. We use this counter to make only - a 100 reply (without a following second response - code) result in a CURLE_GOT_NOTHING error code */ - struct timeval start; /* transfer started at this time */ struct timeval now; /* current time */ bool header; /* incoming data has HTTP header */ @@ -742,6 +735,13 @@ struct connectdata { unsigned short remote_port; /* what remote port to connect to, not the proxy port! */ + long headerbytecount; /* only count received headers */ + long deductheadercount; /* this amount of bytes doesn't count when we check + if anything has been transfered at the end of + a connection. We use this counter to make only + a 100 reply (without a following second response + code) result in a CURLE_GOT_NOTHING error code */ + char *user; /* user name string, allocated */ char *passwd; /* password string, allocated */ |