Re: [PATCH] HTTP proxy, ab, and Host: as a hop-by-hop header?

2002-03-29 Thread dirkx


 The problem I'm encountering is that ab(1) generates Host: header
 pointing to proxy server instead of real destination host.
 Due to this behavior, proxy server (not mod_proxy, BTW) is failing
 to send a valid HTTP request to destintion webserver using name-based
 virtualhost, as it simply passes Host: header with its (proxy
 server's) hostname in it.

I am fixing this... but the puzzle I have is that -always- adding
a ':80' in the Host: is kind of causing an extra 3 bytes on the wire for
each request - which makes it harder to compare the results a runs
against each other.

Let me puzzle a bit.

Dw




Re: [PATCH] HTTP proxy, ab, and Host: as a hop-by-hop header?

2002-03-29 Thread dirkx


Actually:

 The problem I'm encountering is that ab(1) generates Host: header
 pointing to proxy server instead of real destination host.
 Due to this behavior, proxy server (not mod_proxy, BTW) is failing
 to send a valid HTTP request to destintion webserver using name-based
 virtualhost, as it simply passes Host: header with its (proxy
 server's) hostname in it.

I am double checking the spec. To verify what exactly should be send - as
one could also have to consider a proxy on a vhost.

To summarize, in the case of a PROXY we have

proxyhost + proxyport
full URL (http://urlhost:urlport/foo) (or ftp, etc)

and we do

connect to proxyhost, proxyport
then say 'GET full-URL HTTP...'

And now the question is, do we do

Host: proxyhost [:proxyport]
or
Host: urlhost[:urlport]
or
nil (i.e. explictly NO Host:).

Dw




Re: [PATCH] HTTP proxy, ab, and Host: as a hop-by-hop header?

2002-03-29 Thread Chuck Murcko

For HTTP 1.1 you should use the Host: urlhost[:urlport] form. AFAICS 
these are the simplest possible proxy requests:

HTTP 1.0:
GET http://www.ibm.com/ HTTP/1.0
crcr

HTTP 1.1:
GET http://www.ibm.com/ HTTP/1.1
Host: www.ibm.com
crcr

Chuck

On Friday, March 29, 2002, at 02:41 PM, [EMAIL PROTECTED] wrote:


 Actually:

 The problem I'm encountering is that ab(1) generates Host: header
 pointing to proxy server instead of real destination host.
 Due to this behavior, proxy server (not mod_proxy, BTW) is failing
 to send a valid HTTP request to destintion webserver using name-based
 virtualhost, as it simply passes Host: header with its (proxy
 server's) hostname in it.

 I am double checking the spec. To verify what exactly should be send - 
 as
 one could also have to consider a proxy on a vhost.

 To summarize, in the case of a PROXY we have

   proxyhost + proxyport
   full URL (http://urlhost:urlport/foo) (or ftp, etc)

 and we do

   connect to proxyhost, proxyport
   then say 'GET full-URL HTTP...'

 And now the question is, do we do

   Host: proxyhost [:proxyport]
 or
   Host: urlhost[:urlport]
 or
   nil (i.e. explictly NO Host:).

 Dw





Re: [PATCH] HTTP proxy, ab, and Host: as a hop-by-hop header?

2002-03-29 Thread dirkx


Yes - our mails crossed - quite some change between earlier drafts and the
final RFC2616 which has little guidance for proxies.

Dw.

-- 
Dirk-Willem van Gulik

On Fri, 29 Mar 2002, Chuck Murcko wrote:

 For HTTP 1.1 you should use the Host: urlhost[:urlport] form. AFAICS
 these are the simplest possible proxy requests:

 HTTP 1.0:
 GET http://www.ibm.com/ HTTP/1.0
 crcr

 HTTP 1.1:
 GET http://www.ibm.com/ HTTP/1.1
 Host: www.ibm.com
 crcr

 Chuck

 On Friday, March 29, 2002, at 02:41 PM, [EMAIL PROTECTED] wrote:

 
  Actually:
 
  The problem I'm encountering is that ab(1) generates Host: header
  pointing to proxy server instead of real destination host.
  Due to this behavior, proxy server (not mod_proxy, BTW) is failing
  to send a valid HTTP request to destintion webserver using name-based
  virtualhost, as it simply passes Host: header with its (proxy
  server's) hostname in it.
 
  I am double checking the spec. To verify what exactly should be send -
  as
  one could also have to consider a proxy on a vhost.
 
  To summarize, in the case of a PROXY we have
 
  proxyhost + proxyport
  full URL (http://urlhost:urlport/foo) (or ftp, etc)
 
  and we do
 
  connect to proxyhost, proxyport
  then say 'GET full-URL HTTP...'
 
  And now the question is, do we do
 
  Host: proxyhost [:proxyport]
  or
  Host: urlhost[:urlport]
  or
  nil (i.e. explictly NO Host:).
 
  Dw