diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-10-22 00:09:49 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-10-23 11:43:41 +0200 |
commit | 6535b9303df83eb3f1e95fded0d778e51d9aa50c (patch) | |
tree | 694870098d0db8871e0246117003d1bcc1ee3b7a /lib/transfer.c | |
parent | ca10fae6fc0131476b79b293e8d7087455c04ead (diff) | |
download | curl-6535b9303df83eb3f1e95fded0d778e51d9aa50c.tar.gz |
Curl_follow: return better errors on URL problems
... by making the converter function global and accessible.
Closes #3153
Diffstat (limited to 'lib/transfer.c')
-rw-r--r-- | lib/transfer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index e6d98cfa4..c7f4ef9f3 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -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 |