Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CURL.SetOptionProtocolsString
The protocols to allow.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 12.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "CURL.SetOptionProtocolsString"; curl; Value ) More
Parameters
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
Value | The new value. |
Result
Returns OK or error.
Description
The protocols to allow.Pass a string that holds a comma-separated list of case insensitive protocol names (URL schemes) to allow in the transfer. This option allows applications to use libcurl built to support a wide range of protocols but still limit specific transfers to only be allowed to use a subset of them. By default, libcurl accepts all protocols it was built with support for. See also CURL.SetOptionReditProtocolsString.
If trying to set a non-existing protocol or if no matching protocol at all is 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
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 but are introduced in a future libcurl version.
CURL.Protocols can be used to get a list of all supported protocols in the current libcurl. CURL.GetProtocol function is the recommended way to figure out the protocol used in a previous transfer.
See also
Release notes
- Version 13.0
- Deprecated CURL.SetOptionProtocols in favor of CURL.SetOptionProtocolsString function.
Blog Entries
This function checks for a license.
Created 1st September 2022, last changed 1st September 2022