aboutsummaryrefslogtreecommitdiff
path: root/lib/setopt.c
diff options
context:
space:
mode:
authorLawrence Matthews <lmatthew@yelp.com>2016-12-01 04:05:04 -0800
committerDaniel Stenberg <daniel@haxx.se>2018-03-17 11:50:06 +0100
commit6baeb6df35d24740c55239f24b5fc4ce86f375a5 (patch)
tree6a8ec40408e6827f40b750985517e575c89545fc /lib/setopt.c
parent9572831b0470378c2f45f2891feb91dea19c16d7 (diff)
CURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocol
Add --haproxy-protocol for the command line tool Closes #2162
Diffstat (limited to 'lib/setopt.c')
-rw-r--r--lib/setopt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/setopt.c b/lib/setopt.c
index 9c96eb358..737a60f85 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -1603,6 +1603,13 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option,
data->set.crlf = (0 != va_arg(param, long)) ? TRUE : FALSE;
break;
+ case CURLOPT_HAPROXYPROTOCOL:
+ /*
+ * Set to send the HAProxy Proxy Protocol header
+ */
+ data->set.haproxyprotocol = (0 != va_arg(param, long)) ? TRUE : FALSE;
+ break;
+
case CURLOPT_INTERFACE:
/*
* Set what interface or address/hostname to bind the socket to when