From: Daniel Stenberg Date: Tue, 7 Jun 2022 21:28:07 +0000 (+0200) Subject: transfer: maintain --path-as-is after redirects X-Git-Tag: curl-7_84_0~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07058f6ad8e1d301291463c476615bc8a6733a11;p=thirdparty%2Fcurl.git transfer: maintain --path-as-is after redirects Reported-by: Marcus T Fixes #8974 Closes #8975 --- diff --git a/lib/transfer.c b/lib/transfer.c index 5367c03848..4f1b4b535e 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -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);