bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Host header for CONNECT method


From: Pavel Mateja
Subject: Re: [Bug-wget] Host header for CONNECT method
Date: Wed, 30 Jan 2013 16:02:07 +0100
User-agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; )

> On 30/01/13 12:47, Pavel Mateja wrote:
> > Hi,
> > I tried new wget from debian squeeze with apache proxy and I ended with
> > error message:
> > AH00569: client sent HTTP/1.1 request without hostname (see RFC2616
> > section 14.23): /
> > Apache source clearly says:
> > /*
> > 
> >  * Client sent us an HTTP/1.1 or later request without telling us the
> >  * hostname, either with a full URL or a Host: header. We therefore
> >  * need to (as per the 1.1 spec) send an error.  As a special case,
> >  * HTTP/1.1 mentions twice (S9, S14.23) that a request MUST contain
> >  * a Host: header, and the server MUST respond with 400 if it doesn't.
> >  */
> > 
> > Compare with wget source:
> > /* Examples in rfc2817 use the Host header in CONNECT
> > 
> >  requests.  I don't see how that gains anything, given
> >  that the contents of Host would be exactly the same as
> >  the contents of CONNECT.  */
> > 
> > The answer is: you will gain compliance to RFC and compatibility.
> > Check attached patch please.
> 
> Looks good, although I would keep a comment refering to rfc2817 and
> mentioning
> Apache enforcing the host requisite even for connect method.

Hi,
apache is just correctly implementing rfc2616:

Section 9 Method Definitions:
...
The Host request-header field (section 14.23) MUST accompany all HTTP/1.1 
requests.

Section 14.23 Host
...
All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) 
status code to any HTTP/1.1 request message which lacks a Host header field.

There are no exceptions for CONNECT. I guess rfc2817 should have mention that 
in examples.
-- 
Pavel Mateja



reply via email to

[Prev in Thread] Current Thread [Next in Thread]