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/url.h | |
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/url.h')
-rw-r--r-- | lib/url.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -46,7 +46,8 @@ CURLcode Curl_parse_login_details(const char *login, const size_t len, char **userptr, char **passwdptr, char **optionsptr); -const struct Curl_handler *Curl_builtin_scheme(const char *scheme); +const struct Curl_handler *Curl_builtin_scheme(const char *scheme, + size_t schemelen); bool Curl_is_ASCII_name(const char *hostname); CURLcode Curl_idnconvert_hostname(struct Curl_easy *data, |