aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-04-27 08:02:10 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-04-27 08:02:10 +0000
commit3974f30ed466c1ec8430061574f9c3530982660d (patch)
tree9ed120cc39f2c54bc56089e451248ae9ae0f5f94 /lib/url.c
parent44c246dbf2104258551f339eade5d8101d120a7d (diff)
improved treatment of "Content-Length: 0", which is done by having
maxdownload set to -1 when not used
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index d85c61404..924f342bb 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1364,6 +1364,9 @@ static CURLcode Connect(struct UrlData *data,
conn->bits.user_passwd = data->userpwd?1:0;
conn->bits.proxy_user_passwd = data->proxyuserpwd?1:0;
+ /* maxdownload must be -1 on init, as 0 is a valid value! */
+ conn->maxdownload = -1; /* might have been used previously! */
+
/* Store creation time to help future close decision making */
conn->created = Curl_tvnow();
@@ -2029,8 +2032,8 @@ static CURLcode Connect(struct UrlData *data,
conn->ppath = path; /* set this too */
/* re-use init */
- conn->maxdownload = 0; /* might have been used previously! */
conn->bits.reuse = TRUE; /* yes, we're re-using here */
+ conn->maxdownload = -1; /* might have been used previously! */
free(old_conn); /* we don't need this anymore */