mirror of
https://github.com/curl/curl.git
synced 2026-08-25 17:13:31 +03:00
urlapi: fix redirect handling if CURLU_NO_GUESS_SCHEME is set
Verified by test 1967 Reported-by: Joshua Rogers Closes #21721
This commit is contained in:
parent
8e549fbdd3
commit
7e350dd147
5 changed files with 77 additions and 4 deletions
|
|
@ -1731,8 +1731,9 @@ static CURLUcode set_url(CURLU *u, const char *url, size_t part_size,
|
|||
return parseurl_and_replace(url, u, flags);
|
||||
|
||||
/* if the old URL is incomplete (we cannot get an absolute URL in
|
||||
'oldurl'), replace the existing with the new */
|
||||
uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags);
|
||||
'oldurl'), replace the existing with the new.
|
||||
Always include "scheme://" to make the URL "complete" */
|
||||
uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags& ~CURLU_NO_GUESS_SCHEME);
|
||||
if(uc == CURLUE_OUT_OF_MEMORY)
|
||||
return uc;
|
||||
else if(uc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue