httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1445133 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/mod_dir.xml modules/mappers/mod_dir.c
Date Tue, 12 Feb 2013 12:27:06 GMT
Author: rjung
Date: Tue Feb 12 12:27:06 2013
New Revision: 1445133

URL: http://svn.apache.org/r1445133
Log:
FallbackResource: Support for the 'disabled' argument

Backport of r1398066 from trunk resp. r1416585 form 2.4.x.

Submitted by: gryzor
Reviewed by: wrowe, rjung
Backported by: gryzor

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml
    httpd/httpd/branches/2.2.x/modules/mappers/mod_dir.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=1445133&r1=1445132&r2=1445133&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Tue Feb 12 12:27:06 2013
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.24
 
+  *) mod_dir: Add support for the value 'disabled' in FallbackResource.
+     [Vincent Deffontaines]
+
   *) mod_ldap: Fix regression in handling "server unavailable" errors on
      Windows.  PR 54140.  [Eric Covener]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=1445133&r1=1445132&r2=1445133&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Tue Feb 12 12:27:06 2013
@@ -94,13 +94,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_dir: Support for the 'disabled' FallbackResource argument
-     trunk patch : https://svn.apache.org/viewvc?view=revision&revision=1398066
-     Also suggested for backport to 2.4
-     2.2.x src patch: trunk patch works
-     2.2.x documentation patch : http://apache-doc-fr.gryzor.com/fallbackresource_disabled_2.2_doc.patch
-     +1: gryzor, wrowe, rjung
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 

Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml?rev=1445133&r1=1445132&r2=1445133&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml Tue Feb 12 12:27:06 2013
@@ -43,7 +43,7 @@
     </ul>
     <p>The two functions are separated so that you can completely
     remove (or replace) automatic index generation should you want
-    to.</p> 
+    to.</p>
 
     <p>A "trailing slash" redirect is issued when the server
     receives a request for a URL
@@ -95,8 +95,8 @@ a directory</description>
     executed if neither <code>index.html</code> or <code>index.txt</code>
     existed in a directory.</p>
 
-    <p><strong>Note:</strong> Multiple <directive>DirectoryIndex</directive>

-    directives within the <a href="../sections.html"><em>same context</em></a>
will add 
+    <p><strong>Note:</strong> Multiple <directive>DirectoryIndex</directive>
+    directives within the <a href="../sections.html"><em>same context</em></a>
will add
     to the list of resources to look for rather than replace:
     </p>
 
@@ -173,12 +173,13 @@ a directory</description>
 <directivesynopsis>
 <name>FallbackResource</name>
 <description>Define a default URL for requests that don't map to a file</description>
-<syntax>FallbackResource <var>local-url</var></syntax>
+<syntax>FallbackResource disabled | <var>local-url</var></syntax>
 <default>None - httpd will return 404 (Not Found)</default>
 <contextlist><context>server config</context><context>virtual host</context>
 <context>directory</context><context>.htaccess</context></contextlist>
 <override>Indexes</override>
-<compatibility>Apache HTTP Server 2.2.16 and later</compatibility>
+<compatibility>Apache HTTP Server 2.2.16 and later - The <code>disabled</code>
argument
+is supported since 2.2.24</compatibility>
 <usage>
     <p>Use this to set a handler for any URL that doesn't map to anything
     in your filesystem, and would otherwise return HTTP 404 (Not Found).
@@ -202,6 +203,8 @@ a directory</description>
     </example>
     <p>Existing files, such as images, css files, and so on, will be
     served normally.</p>
+    <p>Use the <code>disabled</code> argument to disable that feature
+    if inheritance from a parent directory is not desired.</p>
     <p>In a sub-URI, such as <em>http://example.com/blog/</em> this
     <em>sub-URI</em> has to be supplied as <var>local-url</var>:</p>
     <example>
@@ -211,6 +214,11 @@ a directory</description>
                   FallbackResource /blog/index.php<br />
              </indent>
              &lt;/Directory&gt;
+             &lt;Directory /web/example.com/htdocs/blog/images&gt;<br />
+	     <indent>
+                  FallbackResource disabled<br />
+             </indent>
+             &lt;/Directory&gt;
          </code>
     </example>
 </usage>

Modified: httpd/httpd/branches/2.2.x/modules/mappers/mod_dir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/mappers/mod_dir.c?rev=1445133&r1=1445132&r2=1445133&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/mappers/mod_dir.c (original)
+++ httpd/httpd/branches/2.2.x/modules/mappers/mod_dir.c Tue Feb 12 12:27:06 2013
@@ -106,7 +106,7 @@ static int fixup_dflt(request_rec *r)
     int error_notfound = 0;
 
     name_ptr = d->dflt;
-    if (name_ptr == NULL) {
+    if ((name_ptr == NULL) || !(strcasecmp(name_ptr,"disabled"))) {
         return DECLINED;
     }
     /* XXX: if DefaultHandler points to something that doesn't exist,



Mime
View raw message