From 58f8d948acf3e9d35a9326b5b4996b55eed75a02 Mon Sep 17 00:00:00 2001 From: Lars Hupel Date: Thu, 30 Sep 2010 01:27:36 +0100 Subject: 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: Signed-off-by: Lars Hupel Acked-by: Peter Stuge Acked-by: Gert Doering Signed-off-by: David Sommerseth Trac-ticket: 63 --- proxy.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'proxy.c') 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) { -- cgit v1.2.3