]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
transfer: maintain --path-as-is after redirects
authorDaniel Stenberg <daniel@haxx.se>
Tue, 7 Jun 2022 21:28:07 +0000 (23:28 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 8 Jun 2022 08:30:36 +0000 (10:30 +0200)
Reported-by: Marcus T
Fixes #8974
Closes #8975

lib/transfer.c

index 5367c0384817297a99f9411adfb5322a4da18bbf..4f1b4b535ecd1ea7273ed2e8cc3efc4e5fc69c67 100644 (file)
@@ -1607,7 +1607,8 @@ CURLcode Curl_follow(struct Curl_easy *data,
   uc = curl_url_set(data->state.uh, CURLUPART_URL, newurl,
                     (type == FOLLOW_FAKE) ? CURLU_NON_SUPPORT_SCHEME :
                     ((type == FOLLOW_REDIR) ? CURLU_URLENCODE : 0) |
-                    CURLU_ALLOW_SPACE);
+                    CURLU_ALLOW_SPACE |
+                    (data->set.path_as_is ? CURLU_PATH_AS_IS : 0));
   if(uc) {
     if(type != FOLLOW_FAKE)
       return Curl_uc_to_curlcode(uc);