summaryrefslogtreecommitdiff
path: root/lib/url.h
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2022-09-15 13:30:09 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-09-16 23:29:01 +0200
commit9d51329047952ebfc2b944b7448b8f87f9e6ed51 (patch)
tree65e16f03a3efce60410c79d751793260ca172e17 /lib/url.h
parent1bbffa08336d6dc647c45a3dbf7462174702bb88 (diff)
downloadcurl-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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/url.h b/lib/url.h
index e3b294030..ba4270d52 100644
--- a/lib/url.h
+++ b/lib/url.h
@@ -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,