url: URL encode the path when extracted, if spaces were set

This commit is contained in:
Daniel Stenberg 2022-06-08 16:32:46 +02:00
parent c3fc406ebb
commit 90a7017acb
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -2111,7 +2111,8 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data,
else if(uc != CURLUE_NO_OPTIONS)
return Curl_uc_to_curlcode(uc);
uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path, 0);
uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path,
CURLU_URLENCODE);
if(uc)
return Curl_uc_to_curlcode(uc);