> Current behavior is correct. The first one is what should be sent.
> [...]
> Actually it is helpful. It says that *the resource being requested as
> obtained from the original URI given by the user* is what should be
> sent. This is the "remote" parameter and nothing else.

So what you're implying is that if a request is sent, the part after
'CONNECT' must be always the same as the part after 'Host'.

> I'll ack your patch if it only adds a Host header where one is
> missing, and sends the correct contents, ie. the "remote" hostname.

Hopefully the attached patch is acceptable for you.

Lars
--- openvpn-2.1.3.orig/proxy.c	2010-09-26 23:05:46.000000000 +0100
+++ openvpn-2.1.3/proxy.c	2010-09-29 15:50:55.000000000 +0100
@@ -551,6 +551,10 @@
       /* send HTTP CONNECT message to proxy */
       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)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to