diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-05-15 08:42:57 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-05-16 08:11:37 +0200 |
commit | f506ce099f1ba0f659ff574d2ab09cfb18e8a203 (patch) | |
tree | 0b4495ae72ab0c2f410f95bf263ae5b632023021 /src | |
parent | fe20826b580aa221f8f796cba236d08dc0fd80fd (diff) | |
download | curl-f506ce099f1ba0f659ff574d2ab09cfb18e8a203.tar.gz |
curl: don't set FTP options for FTP-disabled builds
... since libcurl has started to be totally unaware of options for
disabled protocols they now return error.
Bug: https://github.com/curl/curl/commit/c9c5304dd4747cbe75d2f24be85920d572fcb5b8#commitcomment-33533937
Reported-by: Marcel Raad
Closes #3886
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_operate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index e1ceabe7a..6ed06e0f4 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1018,7 +1018,9 @@ static CURLcode operate_do(struct GlobalConfig *global, } /* (built_in_protos & CURLPROTO_HTTP) */ +#ifndef CURL_DISABLE_FTP my_setopt_str(curl, CURLOPT_FTPPORT, config->ftpport); +#endif my_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, config->low_speed_limit); my_setopt(curl, CURLOPT_LOW_SPEED_TIME, config->low_speed_time); @@ -1373,12 +1375,13 @@ static CURLcode operate_do(struct GlobalConfig *global, my_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl?1L:0L); +#ifndef CURL_DISABLE_FTP /* curl 7.14.2 */ my_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, config->ftp_skip_ip?1L:0L); /* curl 7.15.1 */ my_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long)config->ftp_filemethod); - +#endif /* curl 7.15.2 */ if(config->localport) { my_setopt(curl, CURLOPT_LOCALPORT, config->localport); |