From: Eric Covener Date: Sun, 6 Sep 2015 02:04:30 +0000 (+0000) Subject: allow autoindex w/o mod_dir/mod_mime setting the DIR_MAGIC_TYPE. X-Git-Tag: 2.5.0-alpha~2865 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6085de039afd8caa5aa9a825dfcb09d9c8214e5c;p=apache allow autoindex w/o mod_dir/mod_mime setting the DIR_MAGIC_TYPE. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1701436 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index f16198e107..674f509312 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_autoindex: Allow autoindexes when neither mod_dir nor mod_mime are + loaded. [Eric Covener] + *) mod_charset_lite: On EBCDIC platforms, make sure mod_charset_lite runs after other resource-level filters. [Eric Covener] diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 043a7af736..8f8cc8e2e6 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -2274,7 +2274,10 @@ static int handle_autoindex(request_rec *r) autoindex_config_rec *d; int allow_opts; - if(strcmp(r->handler,DIR_MAGIC_TYPE)) { + if (strcmp(r->handler,DIR_MAGIC_TYPE) && !AP_IS_DEFAULT_HANDLER_NAME(r->handler)) { + return DECLINED; + } + if (r->finfo.filetype != APR_DIR) { return DECLINED; }