transfer: maintain --path-as-is after redirects

Reported-by: Marcus T
Fixes #8974
Closes #8975
This commit is contained in:
Daniel Stenberg 2022-06-07 23:28:07 +02:00
parent 5394cbf570
commit 07058f6ad8
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1607,7 +1607,8 @@ CURLcode Curl_follow(struct Curl_easy *data,
uc = curl_url_set(data->state.uh, CURLUPART_URL, newurl, uc = curl_url_set(data->state.uh, CURLUPART_URL, newurl,
(type == FOLLOW_FAKE) ? CURLU_NON_SUPPORT_SCHEME : (type == FOLLOW_FAKE) ? CURLU_NON_SUPPORT_SCHEME :
((type == FOLLOW_REDIR) ? CURLU_URLENCODE : 0) | ((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(uc) {
if(type != FOLLOW_FAKE) if(type != FOLLOW_FAKE)
return Curl_uc_to_curlcode(uc); return Curl_uc_to_curlcode(uc);