aboutsummaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-12-16 15:34:14 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-12-16 15:34:14 +0100
commit642398c6517bac82d80089ecba9c2057a0752d74 (patch)
treead248ae887f22bc6df8852f9f6fc98e276021a3f /src/tool_operate.c
parent7907a2bec9c2d69e901dcc662c9e048ff0248b7d (diff)
curl: normal socks proxies still use CURLOPT_PROXY
... the newly introduced CURLOPT_SOCKS_PROXY is special and should be asked for specially. (Needs new code.) Unified proxy type to a single variable in the config struct.
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 504c20769..9fc03b43b 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -858,19 +858,18 @@ static CURLcode operate_do(struct GlobalConfig *global,
/* TODO: Make this a run-time check instead of compile-time one. */
my_setopt_str(curl, CURLOPT_PROXY, config->proxy);
+ /* new in libcurl 7.5 */
+ if(config->proxy)
+ my_setopt_enum(curl, CURLOPT_PROXYTYPE, config->proxyver);
+
my_setopt_str(curl, CURLOPT_PROXYUSERPWD, config->proxyuserpwd);
/* new in libcurl 7.3 */
my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel?1L:0L);
- /* new in libcurl 7.5 */
- if(config->proxy)
- my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->proxyver);
-
/* new in libcurl 7.52.0 */
- if(config->socksproxy) {
+ if(config->socksproxy)
my_setopt_str(curl, CURLOPT_SOCKS_PROXY, config->socksproxy);
- }
/* new in libcurl 7.10.6 */
if(config->proxyanyauth)