From: Lars Hupel Date: Thu, 30 Sep 2010 00:27:36 +0000 (+0100) Subject: Add HTTP/1.1 Host header X-Git-Tag: v2.2-beta4~7^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58f8d948acf3e9d35a9326b5b4996b55eed75a02;p=thirdparty%2Fopenvpn.git 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 --- diff --git a/proxy.c b/proxy.c index 3de2ac1a2..fce64a14f 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) {