diff options
author | Patrick Monnerat <patrick@monnerat.net> | 2022-09-15 13:30:09 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-09-16 23:29:01 +0200 |
commit | 9d51329047952ebfc2b944b7448b8f87f9e6ed51 (patch) | |
tree | 65e16f03a3efce60410c79d751793260ca172e17 /lib/transfer.c | |
parent | 1bbffa08336d6dc647c45a3dbf7462174702bb88 (diff) | |
download | curl-9d51329047952ebfc2b944b7448b8f87f9e6ed51.tar.gz |
setopt: use the handler table for protocol name to number conversions
This also returns error CURLE_UNSUPPORTED_PROTOCOL rather than
CURLE_BAD_FUNCTION_ARGUMENT when a listed protocol name is not found.
A new schemelen parameter is added to Curl_builtin_scheme() to support
this extended use.
Note that disabled protocols are not recognized anymore.
Tests adapted accordingly.
Closes #9472
Diffstat (limited to 'lib/transfer.c')
-rw-r--r-- | lib/transfer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index fcc4006af..441da7342 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1700,7 +1700,7 @@ CURLcode Curl_follow(struct Curl_easy *data, return Curl_uc_to_curlcode(uc); } - p = Curl_builtin_scheme(scheme); + p = Curl_builtin_scheme(scheme, CURL_ZERO_TERMINATED); if(p && (p->protocol != data->info.conn_protocol)) { infof(data, "Clear auth, redirects scheme from %s to %s", data->info.conn_scheme, scheme); |