]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
url: URL encode the path when extracted, if spaces were set
authorDaniel Stenberg <daniel@haxx.se>
Wed, 8 Jun 2022 14:32:46 +0000 (16:32 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 8 Jun 2022 14:32:46 +0000 (16:32 +0200)
lib/url.c

index dc7bbfda2f3c20589399ec219833f04bacfc1574..5ca3410f507603b8b7639aff82bf5b0dd0f10232 100644 (file)
--- 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);