From: Daniel Stenberg Date: Mon, 18 Oct 2021 12:36:34 +0000 (+0200) Subject: url: set "k->size" -1 at start of request X-Git-Tag: curl-7_80_0~97 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bffe90cf2e33ab81fcf0e58bdf1bff2e712c0dde;p=thirdparty%2Fcurl.git url: set "k->size" -1 at start of request The size of the transfer is unknown at that point. Fixes #7871 Closes #7872 --- 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);