From bffe90cf2e33ab81fcf0e58bdf1bff2e712c0dde Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 Oct 2021 14:36:34 +0200 Subject: [PATCH] url: set "k->size" -1 at start of request The size of the transfer is unknown at that point. Fixes #7871 Closes #7872 --- lib/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/url.c b/lib/url.c index 1603b30727..9d60478043 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); -- 2.47.3