]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
url: set "k->size" -1 at start of request
authorDaniel Stenberg <daniel@haxx.se>
Mon, 18 Oct 2021 12:36:34 +0000 (14:36 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 18 Oct 2021 14:27:02 +0000 (16:27 +0200)
The size of the transfer is unknown at that point.

Fixes #7871
Closes #7872

lib/url.c

index 1603b3072766ff75309f92e6bf6d7d234a958129..9d604780432e06c24d3259964f39ec4047683c35 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -4110,7 +4110,7 @@ CURLcode Curl_connect(struct Curl_easy *data,
   /* init the single-transfer specific data */
   Curl_free_request_state(data);
   memset(&data->req, 0, sizeof(struct SingleRequest));
-  data->req.maxdownload = -1;
+  data->req.size = data->req.maxdownload = -1;
 
   /* call the stuff that needs to be called */
   result = create_conn(data, &conn, asyncp);