From a5d6364e88c5cfaf1f520588e74d5434a0743c5a Mon Sep 17 00:00:00 2001
From: Eric Covener
Date: Sun, 19 Oct 2008 12:35:42 +0000
Subject: [PATCH] =?utf8?q?=20=20*)=20mod=5Fdir:=20Support=20"DirectoryInde?=
=?utf8?q?x=20None"=20=20=20=20=20=20Suggested=20By=20Andr=C3=A9=20Warnier?=
=?utf8?q?=20=20[Eric=20Covener]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@706001 13f79535-47bb-0310-9956-ffa450edef68
---
CHANGES | 4 ++++
docs/manual/mod/mod_dir.html.en | 6 +++++-
docs/manual/mod/mod_dir.xml | 6 +++++-
modules/mappers/mod_dir.c | 4 +++-
4 files changed, 17 insertions(+), 3 deletions(-)
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.
+
+

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;
}
--
2.50.1