- From: Roy T. Fielding <fielding@gbiv.com>
- Date: Tue, 19 Mar 2013 10:44:52 -0700
- To: Zhong Yu <zhong.j.yu@gmail.com>
- Cc: HTTP Working Group <ietf-http-wg@w3.org>
On Mar 16, 2013, at 9:26 AM, Zhong Yu wrote: > Quoting http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-22#section-5.4 > > A client MUST send a Host header field in all HTTP/1.1 request > messages. > > If the target URI includes an authority component, then > the Host field-value MUST be identical to that authority component > after excluding any userinfo (Section 2.7.1). > > If the authority > component is missing or undefined for the target URI, then the Host > header field MUST be sent with an empty field-value. > > Can someone elaborate on the last sentence and give an example? Thanks. HTTP can be used with any URI as a request target. The sentence tells the client what to do if that URI has no authority component. GET urn:ietf:rfc:2616.txt HTTP/1.1 Host: Without that sentence, a reasonably sane person might conclude that no Host header field would be sent, but that would result in a 400 error due to the IESG-imposed requirement in the first sentence. ....Roy
Received on Tuesday, 19 March 2013 17:45:16 UTC