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!
This commit is contained in:
Daniel Stenberg
2007-12-02 23:38:23 +00:00
parent 380ed8bebf
commit 1c93e75375
7 changed files with 54 additions and 15 deletions

View File

@@ -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: */