httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Re: over-aggressive redirection in mod_dir
Date Tue, 27 Feb 2001 19:31:35 GMT
Greg Stein wrote:
> 
> Eh? How is that. If http://www.lyra.org/dav translates to a
> directory in the filesystem, then what else can it possibly mean?

What if I want the actual contents of the directory file itself,
rather than the formatted metadata or the collection object?

> Ken: go find the RFC that talks about trailing slashes.

RFC 2518:

> 5.2 Collection Resources
> 
>  A collection is a resource whose state consists of at least a list of
>  internal member URIs and a set of properties, but which may have
>  additional state such as entity bodies returned by GET.  An internal
>  member URI MUST be immediately relative to a base URI of the
>  collection.  That is, the internal member URI is equal to a
>  containing collection's URI plus an additional segment for non-
>  collection resources, or additional segment plus trailing slash "/"
>  for collection resources, where segment is defined in section 3.3 of
>  [RFC2396].
	:
>  There is a standing convention that when a collection is referred to
>  by its name without a trailing slash, the trailing slash is
>  automatically appended.  Due to this, a resource may accept a URI
>  without a trailing "/" to point to a collection. In this case it
>  SHOULD return a content-location header in the response pointing to
>  the URI ending with the "/".  For example, if a client invokes a
>  method on http://foo.bar/blah (no trailing slash), the resource
>  http://foo.bar/blah/ (trailing slash) may respond as if the operation
>  were invoked on it, and should return a content-location header with
>  http://foo.bar/blah/ in it.  In general clients SHOULD use the "/"
>  form of collection names.

So we MAY accept "foo" instead of "foo/", and SHOULD emit a
content-location field if we do, and Web Folders SHOULD include
the trailing slash in the first place.

Note that this is a convention, however, and not a rule.
"foo" != "foo/" -- but it MAY be treated as though it were.

It is not quite as black&white as I thought it to be.  I change
to +1 for the configurable behaviour with the default being the
treatment as equivalence, and -0 for forcing that treatment by
fiat in all cases.
-- 
#ken    P-)}

Ken Coar                    <http://Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed"   <http://ApacheUnleashed.Com/>

ApacheCon 2001!
Four tracks with over 70+ sessions. Free admission to exhibits
and special events - keynote presentations by John 'maddog' Hall
and David Brin. Special thanks to our Platinum Sponsors IBM and
Covalent, Gold Sponsor Thawte, and Silver Sponsor Compaq.  Attend
only Apache event designed and fully supported by the members of
the ASF. See more information and register at <http://ApacheCon.Com/>!

Mime
View raw message