From 7de8e3e41a06ab8031a37105eaaae749bcffc146 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 Oct 2021 14:36:34 +0200 Subject: url: set "k->size" -1 at start of request As the size of the transfer is unknown at thay point. Fixes #7871 --- lib/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/url.c b/lib/url.c index 1603b3072..9d6047804 100644 --- 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); -- cgit v1.2.1