mirror of
https://github.com/curl/curl.git
synced 2026-08-26 07:53:31 +03:00
redirect: when following redirects to an absolute URL, URL encode it
... to make it handle for example (RFC violating) embeded spaces. Reported-by: momala454 on github Fixes #4445 Closes #4447
This commit is contained in:
parent
2c20109a9b
commit
c6f250c4d6
3 changed files with 78 additions and 1 deletions
|
|
@ -1591,7 +1591,8 @@ CURLcode Curl_follow(struct Curl_easy *data,
|
|||
|
||||
DEBUGASSERT(data->state.uh);
|
||||
uc = curl_url_set(data->state.uh, CURLUPART_URL, newurl,
|
||||
(type == FOLLOW_FAKE) ? CURLU_NON_SUPPORT_SCHEME : 0);
|
||||
(type == FOLLOW_FAKE) ? CURLU_NON_SUPPORT_SCHEME :
|
||||
((type == FOLLOW_REDIR) ? CURLU_URLENCODE : 0) );
|
||||
if(uc) {
|
||||
if(type != FOLLOW_FAKE)
|
||||
return Curl_uc_to_curlcode(uc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue