summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Hupel <hupel@in.tum.de>2010-09-30 01:27:36 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-11-12 22:11:49 +0100
commit58f8d948acf3e9d35a9326b5b4996b55eed75a02 (patch)
tree221ef1e236cf4dd8ec7eefe8730da6c710004a06
parent59afc4a5f72e22b850cfa2845385172623a38e77 (diff)
downloadopenvpn-58f8d948acf3e9d35a9326b5b4996b55eed75a02.tar.gz
openvpn-58f8d948acf3e9d35a9326b5b4996b55eed75a02.tar.xz
openvpn-58f8d948acf3e9d35a9326b5b4996b55eed75a02.zip
Add HTTP/1.1 Host header
OpenVPN should send a Host: header to comply with the HTTP/1.1 specification. Full discussion of this patch can be found here: <http://thread.gmane.org/gmane.network.openvpn.devel/4039> Signed-off-by: Lars Hupel <hupel@in.tum.de> Acked-by: Peter Stuge <peter@stuge.se> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <dazo@users.sourceforge.net> Trac-ticket: 63
-rw-r--r--proxy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proxy.c b/proxy.c
index 3de2ac1..fce64a1 100644
--- a/proxy.c
+++ b/proxy.c
@@ -552,6 +552,10 @@ establish_http_proxy_passthru (struct http_proxy_info *p,
if (!send_line_crlf (sd, buf))
goto error;
+ openvpn_snprintf(buf, sizeof(buf), "Host: %s", host);
+ if (!send_line_crlf(sd, buf))
+ goto error;
+
/* send User-Agent string if provided */
if (p->options.user_agent)
{