SYNOPSIS

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REDIR_PROTOCOLS, long bitmask);

DESCRIPTION

Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask limits what protocols libcurl may use in a transfer that it follows to in a redirect when CURLOPT_FOLLOWLOCATION(3) is enabled. This allows you to limit specific transfers to only be allowed to use a subset of protocols in redirections. By default libcurl will allow all protocols except for FILE and SCP.

DEFAULT

All protocols except for FILE and SCP

PROTOCOLS

All

EXAMPLE

TODO

AVAILABILITY

Added in 7.19.4, before then it would follow all protocols.

RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

RELATED TO CURLOPT_REDIR_PROTOCOLS…