Correct behavior of reverse proxies WRT host field.

I'm wondering what the correct behavior of a reverse proxy is with respect
to the host field in the request. At least one of the commercially available
proxies modifies this field as the request is forwarded, setting it to the
address of the destination machine behind it.

This causes problems in the following scenario (and probably elsewhere as
well):
1) user sends a request for /<directory name>
2) reverse proxy converts the host address in the request header (to an IP
address known only on the internal network).
2) web server (IIS or Netscape) issues a redirect with Location: <internal
host>://<directory name>/
3) browser tries to hit an address that is not available to it.

The section of RFC 2068 that I believe is relevant (the first paragraph
under 14.23) is, to my interpretation, could be ambiguous on the issue.
Specifically: "The Host field value MUST represent the network location of
the origin server or gateway given by the original URL".

What should the proxy be doing to the host field (if anything)?

William Wallace                  We rede of ane rycht famouss of renowne, 
InterWorld Corporation      Of worthi blude that ryngis in this regioune, 
Phone: 212-301-2428                 And hensfurth I will my process hald, 
Fax:   212-301-2345            Of Wilyham Wallas yhe haf hard beyne tald.
Email: williamw@interworld.com        Blind Harry, 15th century minstrel.

Received on Wednesday, 28 April 1999 07:58:12 UTC