Some advice needed on how to use the Host header when using a proxy and
confirming its limitations with respect to Host: based proxies.

-       Consider a proxy proxy.com on port PA

-       Consider an origin server or gateway on server.com on port PB

-       Consider a URL: http://server.com[:PB]/foo.html

>From RFC 2616 - 14.23 - the Host header MUST reprsent the naming authority
of the origin server. (And one MUST use the Host: header when one is doing
HTTP/1.1 (19.6.1.1 - assuming it applies to a client doing a proxy
request)).

So I need to do

        tcp-connect( IP-of("proxy.com"), PA)
        send(
                GET http://server.com:PB/foo.html HTTP/1.1
                Host: server.com:PB
                ...

And the proxy MUST discard the Host: header according to 5.2.1 as there
is an absoluteURI.

So questions

-       This is correct ?

-       Now how I connect to a Host: based proxy ?
        -> seems impossible.

-       Why is the Host: header there in this case - as it adds
        no information and it only can cause conflicts (i.e.
        an application for getting about 5.2.1).

I.e. it seems to make that it almost makes more sense to do
as a client during a proxy request:

        connect( IPof("proxy.com"), PA)
        send(
                GET http://server.com/foo.html HTTP/1.1
                [Proxy-]Host: proxy.com:PA
                .....

much along the lines of Proxy-Authenticate et.al.

DW

-- 
Dirk-Willem van Gulik


Reply via email to