]> git.ipfire.org Git - thirdparty/curl.git/commit
setopt: use the handler table for protocol name to number conversions
authorPatrick Monnerat <patrick@monnerat.net>
Thu, 15 Sep 2022 11:30:09 +0000 (13:30 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 16 Sep 2022 21:29:01 +0000 (23:29 +0200)
commit9d51329047952ebfc2b944b7448b8f87f9e6ed51
tree65e16f03a3efce60410c79d751793260ca172e17
parent1bbffa08336d6dc647c45a3dbf7462174702bb88
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
lib/setopt.c
lib/transfer.c
lib/url.c
lib/url.h
lib/urlapi.c
tests/data/test1401
tests/libtest/lib1597.c
tests/libtest/lib1911.c