- From: Greg Stein <gstein@lyra.org>
- Date: Tue, 18 Jun 2002 15:37:04 -0700
- To: Jim Luther <luther.j@apple.com>
- Cc: w3c-dist-auth@w3c.org, fielding@apache.org
On Mon, Jun 17, 2002 at 04:45:44PM -0700, Jim Luther wrote: >... > So by my reading, abs_path should not have a trailing slash. Did I miss > something? If not, I think the WebDAV spec should say that servers MUST > handle Request-URIs to collections without the trail slash. As mentioned previously, the trailing-slash form matches the BNF. > Anyway, trailing slashes issue causes an interoperability problem for > our WebDAV file system and Apache 2.0 servers. Since Mac OS X's WebDAV > file system doesn't know if the end path component passed to it is a > collection or non-collection resource, it doesn't put a trailing slash > on the Request-URI. This works on all servers except for Apache 2 which > sends us a "301 Moved Permanently" response. We don't redirect because > the HTTP spec (RFC 2616, section 10.3.2) 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." Roy Fielding has previous stated that RFC 2616's language is incorrect. The spec is supposed to allow things like PROPFIND. I forget the exact terminology that Roy used (i.e. was it "*all* idempotent methods"? or something else), but PROPFIND was among them. This topic was extensively discussed on the Apache development list when we added that redirection code (actually, we fixed a bug that prevented the "proper" behavior of redirecting for all methods). That was when Roy chimed in about RFC 2616 being slightly incorrect, that a redirection is legal, that Apache 2.0 "should" go ahead and redirect, and that the clients who are *not* following the redirect are simply broken. And given that the non-following clients are "broken", we went ahead and made the default behavior to do the redirection, and called out the broken clients in the standard distribution of httpd.conf. >... > # > # The following directive disables redirects on non-GET requests for > # a directory that does not include the trailing slash. This fixes a > # problem with Microsoft WebFolders which does not appropriately handle > # redirects for folders with DAV methods. > # > BrowserMatch "Microsoft Data Access Internet Publishing Provider" > redirect-carefully > BrowserMatch "^WebDrive" redirect-carefully > > So if we add a similar line: > > BrowserMatch "^WebDAVFS" redirect-carefully > > to Apache's httpd.conf file to do a redirect-carefully for our > User-Agent, our client works great with Apache 2 DAV servers. My response would be "fix your client. do the redirect." :-) If that is going to be impossible to do, then I can add that line to httpd.conf. But I'm reluctant to just start adding stuff. Your client really is "broken" (for some definition thereof :-) if it isn't following the 301. Cheers, -g -- Greg Stein, http://www.lyra.org/
Received on Tuesday, 18 June 2002 18:35:03 UTC