[NNTP] NNTP URI draft
Clive D.W. Feather
clive at demon.net
Tue Mar 8 01:06:33 PST 2005
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 | |
More information about the ietf-nntp
mailing list