Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.4   11.5   12.0   12.1   12.2   12.3   12.4   12.5   13.0   13.1    Statistic    FMM    Blog  

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

Blog Entries

This function checks for a paid license.

Created 1st September 2022, last changed 1st September 2022


CURL.SetOptionProtocols - CURL.SetOptionProxy

💬 Ask a question or report a problem


Start Chat