From: Patrick Monnerat Date: Tue, 13 Sep 2022 17:47:18 +0000 (+0200) Subject: docs: tell about disabled protocols in CURLOPT_*PROTOCOLS_STR. X-Git-Tag: curl-7_86_0~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5261efaed82295d508d9a40d258b6e189180d6a7;p=thirdparty%2Fcurl.git docs: tell about disabled protocols in CURLOPT_*PROTOCOLS_STR. Disabled protocols are now handled as if they were unknown. Also update the possible protocol list. --- diff --git a/docs/cmdline-opts/proto.d b/docs/cmdline-opts/proto.d index 9fc564f8ca..7b9cca02ea 100644 --- a/docs/cmdline-opts/proto.d +++ b/docs/cmdline-opts/proto.d @@ -39,9 +39,9 @@ only enables http and https also only enables http and https .RE .IP -Unknown protocols produce a warning. This allows scripts to safely rely on -being able to disable potentially dangerous protocols, without relying upon -support for that protocol being built into curl to avoid an error. +Unknown and disabled protocols produce a warning. This allows scripts to +safely rely on being able to disable potentially dangerous protocols, without +relying upon support for that protocol being built into curl to avoid an error. This option can be used multiple times, in which case the effect is the same as concatenating the protocols into one instance of the option. diff --git a/docs/libcurl/opts/CURLOPT_PROTOCOLS_STR.3 b/docs/libcurl/opts/CURLOPT_PROTOCOLS_STR.3 index 80ff05c2ce..825f941e89 100644 --- a/docs/libcurl/opts/CURLOPT_PROTOCOLS_STR.3 +++ b/docs/libcurl/opts/CURLOPT_PROTOCOLS_STR.3 @@ -45,8 +45,8 @@ set, it returns error. These are the available protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, -POP3, POP3S, RTMP, RTMPE, RTMPS, RTMPT, RTMPTE, RTMPTS, RTSP, SCP, SFTP, SMB, -SMBS, SMTP, SMTPS, TELNET, TFTP +MQTT, POP3, POP3S, RTMP, RTMPE, RTMPS, RTMPT, RTMPTE, RTMPTS, RTSP, SCP, SFTP, +SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS, WSS You can set "ALL" as a short-cut to enable all protocols. Note that by setting all, you may enable protocols that were not supported the day you write this @@ -76,7 +76,9 @@ if(curl) { .SH AVAILABILITY Added in 7.85.0 .SH RETURN VALUE -Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +Returns CURLE_UNKNOWN_OPTION if the option is not implemented, +CURLE_UNSUPPORTED_PROTOCOL if a listed protocol is not supported or disabled, +CURLE_BAD_FUNCTION_ARGUMENT if no protocol is listed else CURLE_OK. .SH "SEE ALSO" .BR CURLOPT_REDIR_PROTOCOLS_STR "(3), " CURLOPT_URL "(3), " .BR curl_version_info "(3), " CURLINFO_SCHEME "(3), " diff --git a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS_STR.3 b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS_STR.3 index 0fb42bab27..cd527967f6 100644 --- a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS_STR.3 +++ b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS_STR.3 @@ -51,8 +51,8 @@ and since 7.40.0 SMB and SMBS are also disabled. These are the available protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, -POP3, POP3S, RTMP, RTMPE, RTMPS, RTMPT, RTMPTE, RTMPTS, RTSP, SCP, SFTP, SMB, -SMBS, SMTP, SMTPS, TELNET, TFTP +MQTT, POP3, POP3S, RTMP, RTMPE, RTMPS, RTMPT, RTMPTE, RTMPTS, RTSP, SCP, SFTP, +SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS, WSS You can set "ALL" as a short-cut to enable all protocols. Note that by setting all, you may enable protocols that were not supported the day you write this @@ -84,6 +84,8 @@ if(curl) { .SH AVAILABILITY Added in 7.85.0. .SH RETURN VALUE -Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. +Returns CURLE_UNKNOWN_OPTION if the option is not implemented, +CURLE_UNSUPPORTED_PROTOCOL if a listed protocol is not supported or disabled, +CURLE_BAD_FUNCTION_ARGUMENT if no protocol is listed else CURLE_OK. .SH "SEE ALSO" .BR CURLOPT_PROTOCOLS_STR "(3), "