mirror of
https://github.com/curl/curl.git
synced 2026-07-31 09:08:03 +03:00
Curl_follow: accept non-supported schemes for "fake" redirects
When not actually following the redirect and the target URL is only
stored for later retrieval, curl always accepted "non-supported"
schemes. This was a regression from 46e164069d.
Reported-by: Brad King
Fixes #3210
Closes #3215
This commit is contained in:
parent
a4653a7fa2
commit
2c5ec339ea
3 changed files with 61 additions and 2 deletions
|
|
@ -1514,7 +1514,8 @@ CURLcode Curl_follow(struct Curl_easy *data,
|
|||
disallowport = TRUE;
|
||||
|
||||
DEBUGASSERT(data->state.uh);
|
||||
uc = curl_url_set(data->state.uh, CURLUPART_URL, newurl, 0);
|
||||
uc = curl_url_set(data->state.uh, CURLUPART_URL, newurl,
|
||||
(type == FOLLOW_FAKE) ? CURLU_NON_SUPPORT_SCHEME : 0);
|
||||
if(uc)
|
||||
return Curl_uc_to_curlcode(uc);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue