Subject: Re: [hybi] opening headers: multiplicity / port in host

From: Greg Wilkins <[email-masked]>
Date: Fri, 4 Nov 2011 10:43:25 +1100

On 29 October 2011 23:27, Tobias Oberstein <[email-masked]> wrote:
>
> 3) Host header port?
>
> Hybi-17:
> """
>   4.   The request MUST contain a "Host" header field whose value is
>        equal to /host/.
> """
>
> It does not say "equal to /host/[:/port/]".
>
> However, i.e. both Firefox and Chrome will send i.e.
>
> Host: 127.0.0.1:9001
>
> Are both forms allowed?
>
> Host: /host/
> Host: /host/:/port/
>
> And if the client uses the 2nd, validate that /port/ is the one the server is listening on?

Note that the host and port are the ones that the client sent the
request to and not necessarily the ones that the server is listening
on.

For example, a client  could locally redirect wibble:666 to
www.example.com:80 and the host header received by the example.com
server should be wibble:666.

cheers