I believe the problem can be handled much cleaner. I think we can all
agree that returning the 304 in the fixups phase is a good thing. It
allows sub-requests to determine if we are going to get a re-direct or
not. The problem is that before, we could always rely on the re-direction
only really happening if we were in a GET request.
Would we solve the basic problem if we just put a big if statement in the
fixups phase? Something like:
Index: mod_dir.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_dir.c,v
retrieving revision 1.30
diff -u -d -b -w -u -r1.30 mod_dir.c
--- mod_dir.c 2001/02/21 17:54:41 1.30
+++ mod_dir.c 2001/02/24 17:45:50
@@ -118,15 +118,11 @@
static int fixup_dir(request_rec *r)
{
- dir_config_rec *d;
-
if (r->finfo.filetype != APR_DIR) {
return DECLINED;
}
-
- d = (dir_config_rec *) ap_get_module_config(r->per_dir_config,
- &dir_module);
+ if (r->method_number == M_GET) {
if (r->uri[0] == '\0' || r->uri[strlen(r->uri) - 1] != '/') {
char *ifile;
if (r->args != NULL)
@@ -141,6 +137,8 @@
return HTTP_MOVED_PERMANENTLY;
}
return OK;
+ }
+ return DECLINED;
}
static int handle_dir(request_rec *r)
Ryan
On Sat, 24 Feb 2001, Greg Stein wrote:
> The mod_dir changes have seriously busted WebDAV handling in Apache.
>
> Let's say that I go into Windows Explorer and add a Web Folder. One of the
> first things it does is an OPTIONS request against the directory. However,
> it leaves off the trailing slash. The latest Apache 2.0 returns a 301 to
> tell the client to use a slash. However, Web Folders doesn't understand a
> 301 in this case, so it basically says "sorry. no DAV there."
>
>
> I'm not sure what the right solution here is (in the middle of other stuff,
> then some sleep), but I think we need to back off on the redirects.
>
> For now, I've just #if 0'd the fixup_dir() function in mod_dir.c (in my
> working copy). We'll need to fix this before the next tag/roll.
>
> Cheers,
> -g
>
> --
> Greg Stein, http://www.lyra.org/
>
>
_______________________________________________________________________________
Ryan Bloom [EMAIL PROTECTED]
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------