From: Eric Covener Date: Sun, 19 Oct 2008 12:35:42 +0000 (+0000) Subject: *) mod_dir: Support "DirectoryIndex None" X-Git-Tag: 2.3.0~252 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5d6364e88c5cfaf1f520588e74d5434a0743c5a;p=apache *) mod_dir: Support "DirectoryIndex None" Suggested By André Warnier [Eric Covener] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@706001 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 5c7152583b..885a1a14ce 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.3.0 [ When backported to 2.2.x, remove entry from this file ] + + *) mod_dir: Support "DirectoryIndex None" + Suggested By André Warnier [Eric Covener] + *) mod_proxy: Add the possibility to set the worker parameters connectiontimeout and ping in milliseconds. [Ruediger Pluem] diff --git a/docs/manual/mod/mod_dir.html.en b/docs/manual/mod/mod_dir.html.en index 829b41f580..848c7af0ee 100644 --- a/docs/manual/mod/mod_dir.html.en +++ b/docs/manual/mod/mod_dir.html.en @@ -68,7 +68,7 @@ Description:List of resources to look for when the client requests a directory Syntax:DirectoryIndex - local-url [local-url] ... + None | local-url [local-url] ... Default:DirectoryIndex index.html Context:server config, virtual host, directory, .htaccess Override:Indexes @@ -105,6 +105,10 @@ a directory executed if neither index.html or index.txt existed in a directory.

+

A value of "None" prevents mod_dir from + searching for an index.

+ +
top

DirectorySlash Directive

diff --git a/docs/manual/mod/mod_dir.xml b/docs/manual/mod/mod_dir.xml index 07d61642d7..fd500dc834 100644 --- a/docs/manual/mod/mod_dir.xml +++ b/docs/manual/mod/mod_dir.xml @@ -58,7 +58,7 @@ List of resources to look for when the client requests a directory DirectoryIndex - local-url [local-url] ... + None | local-url [local-url] ... DirectoryIndex index.html server configvirtual host directory.htaccess @@ -94,6 +94,10 @@ a directory

would cause the CGI script /cgi-bin/index.pl to be executed if neither index.html or index.txt existed in a directory.

+ +

A value of "None" prevents mod_dir from + searching for an index.

+ diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index 659bfcf0a8..d61c2892ed 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -51,7 +51,9 @@ static const char *add_index(cmd_parms *cmd, void *dummy, const char *arg) if (!d->index_names) { d->index_names = apr_array_make(cmd->pool, 2, sizeof(char *)); } - *(const char **)apr_array_push(d->index_names) = arg; + if (strcasecmp(arg, "none")) { + *(const char **)apr_array_push(d->index_names) = arg; + } return NULL; }