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.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1561447 13f79535-47bb-0310-9956-
ffa450edef68
-*- 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]
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;
}