From 90a7017acb174e356abbb44164afa2cc02eef0bb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 8 Jun 2022 16:32:46 +0200 Subject: [PATCH] url: URL encode the path when extracted, if spaces were set --- lib/url.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/url.c b/lib/url.c index dc7bbfda2f..5ca3410f50 100644 --- a/lib/url.c +++ b/lib/url.c @@ -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); -- 2.47.3