On Thu, Sep 30, 2010 at 02:38:40AM +0200, Peter Stuge wrote: > Lars Hupel wrote: > > > 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'. > > Yep. It's a bit redundant, but consider that CONNECT is already the > odd kid among the HTTP verbs. Most other verbs only take an absolute > path URI, without host component.
On the other hand, in a proxy context the host component is always present even for the other methods. ("The absoluteURI form is REQUIRED when the request is being made to a proxy.") In that sense the host header is sort-of redundant for all proxy requests, and could be used for name-based "do we act as a proxy or an origin server" decisions. Still, duplicating the "target" host name seems to be what regular web browsers do; mine sends "GET http://example.com/test HTTP/1.1" followed by "Host: example.com". And I do agree that this is what the "original URI" verbiage in the RFC implies, though I think it could have been worder better. (Also, the patch looks good.) -- Heikki Kallasjoki heikki.kallasj...@iki.fi