mirror of
https://github.com/curl/curl.git
synced 2026-08-24 21:43:32 +03:00
Curl_follow: return better errors on URL problems
... by making the converter function global and accessible. Closes #3153
This commit is contained in:
parent
ca10fae6fc
commit
6535b9303d
3 changed files with 12 additions and 13 deletions
|
|
@ -1516,13 +1516,11 @@ CURLcode Curl_follow(struct Curl_easy *data,
|
|||
DEBUGASSERT(data->state.uh);
|
||||
uc = curl_url_set(data->state.uh, CURLUPART_URL, newurl, 0);
|
||||
if(uc)
|
||||
/* TODO: consider an error code remap here */
|
||||
return CURLE_URL_MALFORMAT;
|
||||
return Curl_uc_to_curlcode(uc);
|
||||
|
||||
uc = curl_url_get(data->state.uh, CURLUPART_URL, &newurl, 0);
|
||||
if(uc)
|
||||
/* TODO: consider an error code remap here */
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
return Curl_uc_to_curlcode(uc);
|
||||
|
||||
if(type == FOLLOW_FAKE) {
|
||||
/* we're only figuring out the new url if we would've followed locations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue