]> granicus.if.org Git - apache/commitdiff
*) mod_dir: Support "DirectoryIndex None"
authorEric Covener <covener@apache.org>
Sun, 19 Oct 2008 12:35:42 +0000 (12:35 +0000)
committerEric Covener <covener@apache.org>
Sun, 19 Oct 2008 12:35:42 +0000 (12:35 +0000)
     Suggested By AndrĂ© Warnier <aw ice-sa.com> [Eric Covener]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@706001 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
docs/manual/mod/mod_dir.html.en
docs/manual/mod/mod_dir.xml
modules/mappers/mod_dir.c

diff --git a/CHANGES b/CHANGES
index 5c7152583bca70e4e9c8fd56627e4a30339e3cd9..885a1a14cec24cb4353963464f1d5a4592092920 100644 (file)
--- 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 <aw ice-sa.com> [Eric Covener]
+
   *) mod_proxy: Add the possibility to set the worker parameters
      connectiontimeout and ping in milliseconds. [Ruediger Pluem]
 
index 829b41f58060989498adc8fa0da36079caac3135..848c7af0ee5efa2794e00df5167a223921b59567 100644 (file)
@@ -68,7 +68,7 @@
 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>List of resources to look for when the client requests
 a directory</td></tr>
 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DirectoryIndex
-    <var>local-url</var> [<var>local-url</var>] ...</code></td></tr>
+    None | <var>local-url</var> [<var>local-url</var>] ...</code></td></tr>
 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DirectoryIndex index.html</code></td></tr>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
@@ -105,6 +105,10 @@ a directory</td></tr>
     executed if neither <code>index.html</code> or <code>index.txt</code>
     existed in a directory.</p>
 
+    <p>A value of "None" prevents <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> from 
+    searching for an index.</p>
+
+
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="DirectorySlash" id="DirectorySlash">DirectorySlash</a> <a name="directoryslash" id="directoryslash">Directive</a></h2>
index 07d61642d7013f42db031da7916c548224770233..fd500dc83447a6cdab4bec62eb66fd6556d3c07a 100644 (file)
@@ -58,7 +58,7 @@
 <description>List of resources to look for when the client requests
 a directory</description>
 <syntax>DirectoryIndex
-    <var>local-url</var> [<var>local-url</var>] ...</syntax>
+    None | <var>local-url</var> [<var>local-url</var>] ...</syntax>
 <default>DirectoryIndex index.html</default>
 <contextlist><context>server config</context><context>virtual host</context>
 <context>directory</context><context>.htaccess</context></contextlist>
@@ -94,6 +94,10 @@ a directory</description>
     <p>would cause the CGI script <code>/cgi-bin/index.pl</code> to be
     executed if neither <code>index.html</code> or <code>index.txt</code>
     existed in a directory.</p>
+
+    <p>A value of "None" prevents <module>mod_dir</module> from 
+    searching for an index.</p>
+
 </usage>
 </directivesynopsis>
 
index 659bfcf0a86448aa1ec9df2023e8ed3092070628..d61c2892edda85a53ac6c9709027bfcaeb65a288 100644 (file)
@@ -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;
 }