James Yonan <j...@yonan.net> wrote on 4 Nov 2008 12:16:
> Shouldn't you check p->options.http_version and make sure it's >= 1.1 
> before sending the Host header?

Here is a revised patch, that works for me and implements your 
suggestion:

--- proxy.c.orig        2008-10-06 09:22:20.000000000 +0200
+++ proxy.c     2008-11-06 20:49:55.000000000 +0100
@@ -348,6 +348,14 @@ establish_http_proxy_passthru (struct ht
   if (!send_line_crlf (sd, buf))
     goto error;

+  /* send Host: header for HTTP version above 1.0 */
+  if (strcmp(p->options.http_version, "1.0") != 0) {
+    openvpn_snprintf (buf, sizeof(buf), "Host: %s:%d",
+                     host, port);
+    if (!send_line_crlf (sd, buf))
+      goto error;
+  }
+
   /* send User-Agent string if provided */
   if (p->options.user_agent)
     {



Reply via email to