]> granicus.if.org Git - apache/commitdiff
Resolve the mod_dir overaggressive redirection problem seen with non-GET
authorJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 13 Nov 2001 05:10:24 +0000 (05:10 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 13 Nov 2001 05:10:24 +0000 (05:10 +0000)
requests for WebFolders.
Reviewed by: Greg Stein

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91894 13f79535-47bb-0310-9956-ffa450edef68

STATUS
docs/conf/httpd-std.conf
modules/mappers/mod_dir.c

diff --git a/STATUS b/STATUS
index 0aa8d9abf3318296cf8e3ac189de7c8bb85bbee7..19424c208f33738cd1ae529bc2d44b374101274a 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                             -*-text-*-
-Last modified at [$Date: 2001/11/13 05:04:24 $]
+Last modified at [$Date: 2001/11/13 05:10:24 $]
 
 Release:
 
@@ -63,14 +63,6 @@ RELEASE SHOWSTOPPERS:
       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 93d74498160e4362376254b00ec7c6805a0face6..131ae2e0aa0e3b462ac86d15e21888003db7599d 100644 (file)
@@ -902,6 +902,14 @@ BrowserMatch "RealPlayer 4\.0" force-response-1.0
 BrowserMatch "Java/1\.0" force-response-1.0
 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" redirect-carefully
+
 #
 # Allow server status reports, with the URL of http://servername/server-status
 # Change the ".your_domain.com" to match your domain to enable.
index 6097e0a8cbaefa5b1aa3ee35a588c24255e66e06..0c867d1105c2d5b967672f75b67269b00b08b5bc 100644 (file)
@@ -118,9 +118,12 @@ static void *merge_dir_configs(apr_pool_t *p, void *basev, void *addv)
 
 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, "redirect-carefully"))) {
+           return DECLINED;
     }
 
     if (r->uri[0] == '\0' || r->uri[strlen(r->uri) - 1] != '/') {