httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject [PATCH] Remove mod_dir showstopper
Date Sun, 11 Nov 2001 18:43:39 GMT
Greg and Ken and others,

Does this satisfactorily resolve the mod_dir overaggressive
redirection problem seen with non-GET requests for WebFolders?

I don't know what the UA string is for WebFolders, but I 
figure someone out there knows.  -- justin

Index: STATUS
===================================================================
RCS file: /home/cvs/httpd-2.0/STATUS,v
retrieving revision 1.325
diff -u -r1.325 STATUS
--- STATUS	2001/11/11 17:40:23	1.325
+++ STATUS	2001/11/11 18:27:39
@@ -63,14 +63,6 @@
       filename extensions.  Add...FilterByType will add to this quandry.
       Some sort of resolution needs to be proposed, 
 
-    * mod_dir should normally redirect ALL directory requests which do
-      not include a trailing slash on the URI. However, if a "notes"
-      flag is set (say, via BrowserMatch), this behavior will be
-      disabled for non-GET requests.
-        Status: Greg volunteers
-        MsgId: <20010227104646.E2297@lyra.org>
-        MsgId: <3A9C0097.9C83F07C@Golux.Com>
-
     * mod_negotiation needs a new option or directive, something like
       ForceLanguagePriority, to fall back to the LanguagePriority
       directive instead of returning a "no acceptable variant" error.
Index: docs/conf/httpd-std.conf
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/conf/httpd-std.conf,v
retrieving revision 1.63
diff -u -r1.63 httpd-std.conf
--- docs/conf/httpd-std.conf	2001/11/08 22:31:28	1.63
+++ docs/conf/httpd-std.conf	2001/11/11 18:27:39
@@ -903,6 +903,14 @@
 BrowserMatch "JDK/1\.0" force-response-1.0
 
 #
+# 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" no-redir-dir-non-get
+
+#
 # Allow server status reports, with the URL of http://servername/server-status
 # Change the ".your_domain.com" to match your domain to enable.
 #
Index: modules/mappers/mod_dir.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_dir.c,v
retrieving revision 1.34
diff -u -r1.34 mod_dir.c
--- modules/mappers/mod_dir.c	2001/08/23 21:05:42	1.34
+++ modules/mappers/mod_dir.c	2001/11/11 18:27:39
@@ -118,9 +118,12 @@
 
 static int fixup_dir(request_rec *r)
 {
-    /* only (potentially) redirect for GET requests against directories */
-    if (r->method_number != M_GET || r->finfo.filetype != APR_DIR) {
-	return DECLINED;
+    /* only redirect for requests against directories or when we have
+     * a note that says that this browser can not handle redirs on
+     * non-GET requests (such as Microsoft's WebFolders). */
+    if (r->finfo.filetype != APR_DIR || (r->method_number != M_GET && 
+        apr_table_get(r->subprocess_env, "no-redir-dir-non-get"))) {
+	    return DECLINED;
     }
 
     if (r->uri[0] == '\0' || r->uri[strlen(r->uri) - 1] != '/') {


Mime
View raw message