httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: over-aggressive redirection in mod_dir
Date Tue, 27 Feb 2001 18:46:46 GMT
On Tue, Feb 27, 2001 at 01:04:30PM -0500, Rodent of Unusual Size wrote:
> Greg Stein wrote:
> > We aren't talking about GETs. What you state is correct, but
> > only with respect to a GET.
> 
> Umm.. huh?  It applies to anything that tries to interpolate
> relative URIs.  The request method is completely irrelevant.
> Of course, this hardly ever happens with anything *except* GETs,
> but your argument is specious.

URL interpolation (by which I assume you mean "joining a base with a
relative path") occurs within the UA for content bodies returned by a GET. I
don't know of any other situation where it occurs.

The whole redirect thing is really pretty bogus.

    http://www.lyra.org/dav

When I hit the filesystem and see that the above URL refers to a directory,
then I know absolutely and unequivocally that they referred to the
directory. There is just no question about it.

What this whole argument is about is that some people think it really needs
a slash on the end because of some perceived notion of "ambiguity".

Heck, let's pull out our RFCs here. Section 10.3.2 301 Moved Permanently. It
says, "If the 301 status code is received in response to a request other
than GET or HEAD, the user agent MUST NOT automatically redirect the request
unless it can be confirmed by the user, since this might change the
conditions under which the request was issued."

According to that paragraph, WebFolders is perfectly justified in its
behavior (refusing to use the new location as the web folder). IOW, it is
working correctly.

If Apache decides to issue a redirect for a method other than GET/HEAD,
then we should expect that the UA will not automatically switch over and
reissue the request. In fact, the RFC says that it MUST NOT. (emphasis
original)

> > Things like PROPFIND and OPTIONS don't have the issue you describe.
> > The current CVS code only does the redirect for the GET and HEAD
> > methods.
> 
> By 'current' you mean the recently-applied patch, correct?

Yup.

> Which
> behaviour is different from that of the pre-patch software, correct?

The pre-patch would redirect on all requests. But that was caused by other
work in that area. Prior to that, the redirection logic was wrapped up in
the handler. If anybody else handled the request (e.g. mod_dav serving a
PROPFIND or mod_put handling a PUT or DELETE or ...), then the mod_dir
handler wouldn't be invoked and no redirection would occur.


Based on RFC 2616, it appears the current CVS behavior is best for UAs. If
we return redirects, then the UA won't be able to automatically handle them.

I have yet to hear somebody point to an RFC about trailing slashes.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message