diff options
author | Lawrence Matthews <lmatthew@yelp.com> | 2016-12-01 04:05:04 -0800 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-03-17 11:50:06 +0100 |
commit | 6baeb6df35d24740c55239f24b5fc4ce86f375a5 (patch) | |
tree | 6a8ec40408e6827f40b750985517e575c89545fc /src/tool_operate.c | |
parent | 9572831b0470378c2f45f2891feb91dea19c16d7 (diff) |
CURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocol
Add --haproxy-protocol for the command line tool
Closes #2162
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r-- | src/tool_operate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 15cdc13da..0aad54282 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1445,6 +1445,10 @@ static CURLcode operate_do(struct GlobalConfig *global, my_setopt(curl, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, config->happy_eyeballs_timeout_ms); + /* new in 7.60.0 */ + if(config->haproxy_protocol) + my_setopt(curl, CURLOPT_HAPROXYPROTOCOL, 1L); + /* initialize retry vars for loop below */ retry_sleep_default = (config->retry_delay) ? config->retry_delay*1000L : RETRY_SLEEP_DEFAULT; /* ms */ |