Message-ID: <49109F75.8000804@...41...> Date: Tue, 04 Nov 2008 12:16:05 -0700 From: James Yonan MIME-Version: 1.0 References: <200810271301.m9RD1BKT006709@...1141...> In-Reply-To: <200810271301.m9RD1BKT006709@...1141...> Subject: Re: [Openvpn-devel] [patch] enhance compatibility with HTTP/1.1 proxies List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: Frank Behrens Cc: openvpn-devel@lists.sourceforge.net Frank Behrens wrote: > May I propose the following patch to enhance openvpn's compatibility > with HTTP/1.1 proxies? > See > http://tools.ietf.org/html/rfc2616#section-14.23 > and > http://tools.ietf.org/html/rfc2817#section-5.2 > > --- proxy.c.orig 2008-10-06 09:22:20.000000000 +0200 > +++ proxy.c 2008-10-27 13:30:48.000000000 +0100 > @@ -348,6 +348,12 @@ > if (!send_line_crlf (sd, buf)) > goto error; > > + /* send Host: header */ > + 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) > { Shouldn't you check p->options.http_version and make sure it's >= 1.1 before sending the Host header? James