8 Mar 2005 10:06
Re: [NNTP] NNTP URI draft
Clive D.W. Feather <clive <at> demon.net>
2005-03-08 09:06:33 GMT
2005-03-08 09:06:33 GMT
Russ Allbery said: > It's not clear to me whether we should allow the trailing slash to be > optional. What did HTTP do here? I know that browsers support leaving it > off, but is that fixed internal to the browser, or actually allowed in the > protocol? There's two different situations. If you ask for "http://a.server/a/path", the browser constructs a GET request: GET /a/path HTTP/1.1 to be sent to a.server. "http://a.server/a/path" and "http://a.server/a/path/" are actually two different resources. They will result in, respectively: GET /a/path HTTP/1.1 GET /a/path/ HTTP/1.1 What usually happens is that the first generates a "redirected" response pointing at the second, and the browser makes a second request. "http://a.server" is a special case. RFC 2616 says that: Note that the absolute path cannot be empty; if none is present in the original URI, it MUST be given as "/" (the server root). So "http://a.server" and "http://a.server/" both generate the request: GET / HTTP/1.1 -- -- Clive D.W. Feather | Work: <clive <at> demon.net> | Tel: +44 20 8495 6138 Internet Expert | Home: <clive <at> davros.org> | Fax: +44 870 051 9937 Demon Internet | WWW: http://www.davros.org | Mobile: +44 7973 377646 Thus plc | |
RSS Feed