[S.N.Brodie@ecs.soton.ac.uk: HTTP/1.1 Host request-header query]

Resent-Date: Thu, 18 Jan 1996 10:35:00 -0800
From:	Stewart Brodie <S.N.Brodie@ecs.soton.ac.uk>
Resent-To: <janssen@parc.xerox.com>
Resent-To: <masinter@parc.xerox.com>
Resent-To: <norderhaug.chi@xerox.com>
Subject: HTTP/1.1 Host request-header query
To:	www-talk@www10.w3.org
Date:	Thu, 18 Jan 1996 10:34:08 -0800
X-Mailer: ELM [version 2.4 PL24]
Content-Type: text
Content-Length:       1286
Resent-From: www-talk@w3.org
X-Mailing-List: <www-talk@w3.org> archive/latest/2278
X-Loop: www-talk@w3.org
Resent-Sender: www-talk-request@w3.org
Precedence: list

A couple of requests for clarification:

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)?

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.

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.

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

Stewart Brodie, Electronics & Computer Science, Southampton University.
http://www.ecs.soton.ac.uk/~snb94r/      http://delenn.ecs.soton.ac.uk/

Received on Thursday, 18 January 1996 18:21:48 UTC