aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-11-01 23:45:57 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-11-02 09:50:44 +0100
commit2c5ec339ea67f43ac370ae77636a0f915cc5fbeb (patch)
tree234d6426e4645e88e867fa99eb3a67e607619dcb /lib
parenta4653a7fa21e4c2b3881bab4b991e400b81651db (diff)
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 46e164069d1a5230. Reported-by: Brad King Fixes #3210 Closes #3215
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index b73f94d9e..05ba862c2 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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);