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 11:44:17 GMT
Dale Ghent wrote:
> 
> Correct or not, they are equivalent.

No, they are not.

> Since they're equivalent, why is one more correct than the other?
> Put in the perspective of something simpler; Is it better to
> 'cd /usr/' or 'cd /usr' ? Neither is better. They do and mean
> the same thing.

For Unix shells, that is correct.  For Web URLs, it is not.
'http://server/foo' and 'http://server/foo/' are NOT identical;
the second has a trailing empty path segment.

For filesystem datastores, a trailing empty path segment refers
to a collection -- what Dean liked/likes to call the 'directory
object.'  Apache supplies mod_dir and mod_autoindex to respond
to requests for directory objects.

For filesystem datastores, a request that lacks the empty segment
is for the directory itself.  Since that is generally a meaningless
request, mod_dir assumes the directory *object* was meant, and issues
a redirect to the correct URL for that resource.

The thing that raised this issue was Web Folders' inability to
cope with a 301 response to an OPTIONS request.  That is just plain
broken.  It is actually broken in two different ways, since
it should never have made the request without the trailing empty
segment anyway, since it is querying a collection.

The question is whether we work around this brokenness by
*treating* the two different formats as though they are
equivalent (although they actually are not).  Since this
issue comes up repeatedly in other contexts -- filesystem ones --
I am in favour of providing a means of doing so.  If Web Folders
was the only client encountering this, I would say 'no way.'
(Actually, AFAIK it *is* the only broken client -- in all other
cases, it is the users' expectations that are broken. :-)

So let mod_dir treat them as equivalent if the envariable
"no-collection-redirect" is set, otherwise continue in the
current, technically correct, behaviour.
-- 
#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