1CURLOPT_PROXY_TRANSFER_MODE(c3u)rl_easy_setopt optioCnUsRLOPT_PROXY_TRANSFER_MODE(3)
2
3
4

NAME

6       CURLOPT_PROXY_TRANSFER_MODE - append FTP transfer mode to URL for proxy
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode  curl_easy_setopt(CURL  *handle,  CURLOPT_PROXY_TRANSFER_MODE,
12       long enabled);
13

DESCRIPTION

15       Pass a long. If the value is set to 1 (one), it tells  libcurl  to  set
16       the  transfer mode (binary or ASCII) for FTP transfers done via an HTTP
17       proxy, by appending ;type=a or ;type=i to the URL.  Without  this  set‐
18       ting, or it being set to 0 (zero, the default), CURLOPT_TRANSFERTEXT(3)
19       has no effect when doing FTP via a proxy. Beware that not  all  proxies
20       support this feature.
21

DEFAULT

23       0, disabled
24

PROTOCOLS

26       FTP over proxy
27

EXAMPLE

29       CURL *curl = curl_easy_init();
30       if(curl) {
31         curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/old-server/file.txt");
32         curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:80");
33         curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 1L);
34         curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
35         ret = curl_easy_perform(curl);
36         curl_easy_cleanup(curl);
37       }
38

AVAILABILITY

40       Added in 7.18.0
41

RETURN VALUE

43       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
44       if the enabled value is not supported.
45

SEE ALSO

47       CURLOPT_PROXY(3), CURLOPT_HTTPPROXYTUNNEL(3),
48
49
50
51libcurl 7.69.1                  April 17, 2018  CURLOPT_PROXY_TRANSFER_MODE(3)
Impressum