httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chr...@apache.org
Subject svn commit: r1561447 - in /httpd/httpd/trunk: CHANGES modules/mappers/mod_dir.c
Date Sun, 26 Jan 2014 04:09:46 GMT
Author: chrisd
Date: Sun Jan 26 04:09:45 2014
New Revision: 1561447

URL: http://svn.apache.org/r1561447
Log:
Skip DirectoryIndex execution unless method is GET or POST, restoring
2.2 behavior when using mod_dav. PR 54914.

Otherwise, variable behavior results: if no DirectoryIndex file is found,
mod_dav's r->handler runs as expected.  But if an index file is found,
r->handler will be changed by ap_internal_fast_redirect() to something
other than mod_dav's r->handler, while r->method is left unchanged,
usually leading to a 405 response.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/mappers/mod_dir.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1561447&r1=1561446&r2=1561447&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun Jan 26 04:09:45 2014
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_dir: Default to 2.2-like behavior and skip execution when method is
+     neither GET nor POST, such as for DAV requests. PR 54914. [Chris Darroch]
+
   *) mod_rewrite: Rename the handler that does per-directory internal 
      redirects to "rewrite-redirect-handler" from "redirect-handler" so
      it is less ambiguous and less likely to be reused. [Eric Covener]

Modified: httpd/httpd/trunk/modules/mappers/mod_dir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_dir.c?rev=1561447&r1=1561446&r2=1561447&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_dir.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_dir.c Sun Jan 26 04:09:45 2014
@@ -274,6 +274,10 @@ static int fixup_dir(request_rec *r)
         return HTTP_MOVED_PERMANENTLY;
     }
 
+    if (r->method_number != M_GET && r->method_number != M_POST) {
+        return DECLINED;
+    }
+
     if (d->checkhandler == MODDIR_ON && strcmp(r->handler, DIR_MAGIC_TYPE))
{
         return DECLINED;
     }



Mime
View raw message