Changes with Apache 2.0.38
+ *) Make the default_handler catch all requests that aren't served by
+ another handler. This also gets us to return a 404 if a directory
+ is requested, there is no DirectoryIndex, and mod_autoindex isn't
+ loaded. [Justin Erenkrantz]
+
*) Fixed the handling of nested if-statements in shtml files.
PR 9866 [Brian Pane]
*/
int bld_content_md5;
- /*
- * The old way of doing handlers meant that this handler would
- * match literally anything - this way will require handler to
- * have a / in the middle, which probably captures the original
- * intent, but may cause problems at first - Ben 7th Jan 01
- * Don't try to serve a dir. Some OSs do weird things with
- * raw I/O on a dir.
- */
- if ((strcmp(r->handler, "default-handler")
- && !ap_strchr_c(r->handler, '/'))
- || r->finfo.filetype == APR_DIR)
- return DECLINED;
-
d = (core_dir_config *)ap_get_module_config(r->per_dir_config,
&core_module);
bld_content_md5 = (d->content_md5 & 1)
return HTTP_NOT_FOUND;
}
+ /* Don't try to serve a dir. Some OSs do weird things with
+ * raw I/O on a dir.
+ */
+ if (r->finfo.filetype == APR_DIR) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "Attempt to serve directory: %s", r->filename);
+ return HTTP_NOT_FOUND;
+ }
+
if ((r->used_path_info != AP_REQ_ACCEPT_PATH_INFO) &&
r->path_info && *r->path_info)
{