aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-12-02 23:38:23 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-12-02 23:38:23 +0000
commit1c93e75375882ed309c7d93a1ce59d27a53f23d3 (patch)
treec5d2406eff23e3930dcb6dfd53be0bc20266d271 /lib/url.c
parent380ed8bebf4aa3bc605077c8cf5350986ae031a5 (diff)
Michal Marek introduced CURLOPT_PROXY_TRANSFER_MODE which is used to control
the appending of the "type=" thing on FTP URLs when they are passed to a HTTP proxy. Some proxies just don't like that appending (which is done unconditionally in 7.17.1), and some proxies treat binary/ascii transfers better with the appending done!
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index e7c1412bf..a176ac225 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2036,6 +2036,23 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
data->set.new_directory_perms = va_arg(param, long);
break;
+ case CURLOPT_PROXY_TRANSFER_MODE:
+ /*
+ * set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy
+ */
+ switch (va_arg(param, long)) {
+ case 0:
+ data->set.proxy_transfer_mode = FALSE;
+ break;
+ case 1:
+ data->set.proxy_transfer_mode = TRUE;
+ break;
+ default:
+ /* reserve other values for future use */
+ result = CURLE_FAILED_INIT;
+ break;
+ }
+ break;
default:
/* unknown tag and its companion, just ignore: */