19 lines
689 B
Diff
19 lines
689 B
Diff
|
--- a/lib/url.c
|
||
|
+++ a/lib/url.c
|
||
|
@@ -1955,9 +1955,13 @@ static CURLcode findprotocol(struct Curl_easy *data,
|
||
|
/* it is allowed for "normal" request, now do an extra check if this is
|
||
|
the result of a redirect */
|
||
|
if(data->state.this_is_a_follow &&
|
||
|
- !(data->set.redir_protocols & p->protocol))
|
||
|
+ !(data->set.redir_protocols & p->protocol)) {
|
||
|
/* nope, get out */
|
||
|
- break;
|
||
|
+ failf(data, "Redirect to protocol \"%s\" not supported or disabled in " LIBCURL_NAME,
|
||
|
+ protostr);
|
||
|
+
|
||
|
+ return CURLE_UNSUPPORTED_PROTOCOL;
|
||
|
+ }
|
||
|
|
||
|
/* Perform setup complement if some. */
|
||
|
conn->handler = conn->given = p;
|