mirror of
https://github.com/curl/curl.git
synced 2026-08-24 19:03:40 +03:00
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
This commit is contained in:
parent
1bbffa0833
commit
9d51329047
8 changed files with 90 additions and 98 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue