W3C home > Mailing lists > Public > www-talk@w3.org > January to February 1996

Re: HTTP/1.1 Host request-header query

From: Roy T. Fielding <fielding@avron.ics.uci.edu>
Date: Sat, 20 Jan 1996 22:35:41 -0800
To: Stewart Brodie <S.N.Brodie@ecs.soton.ac.uk>
Cc: www-talk@www10.w3.org
Message-Id: <9601202235.aa25700@paris.ics.uci.edu>
> Section 10.22 of the HTTP/1.1 draft (draft-ietf-http-v11-spec-00.*) talks
> about the Host request-header.
> 
> Am I correct in my interpretation that if the user agent is sending the
> request directly to the origin server, then this header is required;
> when sending it not to the origin server, it can be omitted (presumably
> since the complete URL is given in the Request-URI)?

Yes.

> The document also specifies that Host: header "must not include the
> trailing ':port' information which may also be found in the net_loc
> portion of a URL".   Surely the Request-URI sent to an origin server will
> _not_ include the net_loc portion of the URL?  I assume that the server
> can work out the port number in the original URL by doing a getsockname
> (or equivalent) on its end of the connection.

Yes.

> Experimentation with Netscape 2.0b3J shows that it is sending a :port on
> the end of all its Host request-headers containing the complete net_loc
> field of the http URL I entered, although I am well aware not to take
> the behaviour of Netscape as the definitive way to do things.

Netscape 2.0b* is broken in that regard.

> So should I be sending the ':port' or not?

Nope.

 ...Roy T. Fielding
    Department of Information & Computer Science    (fielding@ics.uci.edu)
    University of California, Irvine, CA 92717-3425    fax:+1(714)824-4056
    http://www.ics.uci.edu/~fielding/
Received on Sunday, 21 January 1996 01:42:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:19 GMT