]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
docs: tell about disabled protocols in CURLOPT_*PROTOCOLS_STR.
authorPatrick Monnerat <patrick@monnerat.net>
Tue, 13 Sep 2022 17:47:18 +0000 (19:47 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 16 Sep 2022 21:29:09 +0000 (23:29 +0200)
Disabled protocols are now handled as if they were unknown.
Also update the possible protocol list.

docs/cmdline-opts/proto.d
docs/libcurl/opts/CURLOPT_PROTOCOLS_STR.3
docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS_STR.3

index 9fc564f8cab60d614f54ed3f9547a2df9379a53d..7b9cca02eac961722e96fb6dd119ab310396bee3 100644 (file)
@@ -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.
index 80ff05c2cede159ffcd0cc45b527c04aec10004a..825f941e8949bc64b4915d0703c974dad04cbdff 100644 (file)
@@ -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), "
index 0fb42bab274139d5d1f999a3680636629acead74..cd527967f6bee107ba7e3131c3f55a01400e552b 100644 (file)
@@ -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), "