httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1416585 - in /httpd/httpd/branches/2.4.x: ./ STATUS docs/manual/mod/mod_dir.xml modules/mappers/mod_dir.c
Date Mon, 03 Dec 2012 16:43:49 GMT
Author: jim
Date: Mon Dec  3 16:43:47 2012
New Revision: 1416585

URL: http://svn.apache.org/viewvc?rev=1416585&view=rev
Log:
Merge r1398066 from trunk:

FallbackResource : Support for the 'disabled' argument

Submitted by: gryzor
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/docs/manual/mod/mod_dir.xml
    httpd/httpd/branches/2.4.x/modules/mappers/mod_dir.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1398066

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1416585&r1=1416584&r2=1416585&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Mon Dec  3 16:43:47 2012
@@ -91,11 +91,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
-     2.4.x src patch: trunk patch works
-     documentation patch : http://apache-doc-fr.gryzor.com/fallbackresource_disabled_2.4_doc.patch
-     +1: gryzor, covener, sf
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.4.x/docs/manual/mod/mod_dir.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/mod/mod_dir.xml?rev=1416585&r1=1416584&r2=1416585&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/mod/mod_dir.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/mod/mod_dir.xml Mon Dec  3 16:43:47 2012
@@ -102,8 +102,8 @@ a directory</description>
     literally if it has any arguments before or after it, even if they are "disabled"
     as well.</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>
     <highlight language="config">
@@ -215,18 +215,20 @@ a directory</description>
     <code>index.html</code> file. <strong>But a request without trailing
slash
     would list the directory contents</strong>.</p>
     </note>
-	<p>Also note that some browsers may erroneously change POST requests into GET 
+	<p>Also note that some browsers may erroneously change POST requests into GET
 	(thus discarding POST data) when a redirect is issued.</p>
 </usage>
 </directivesynopsis>
 <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>The <code>disabled</code> argument is available in version
2.4.4 and
+later</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).
@@ -250,12 +252,17 @@ a directory</description>
     </highlight>
     <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>
     <highlight language="config">
 &lt;Directory /web/example.com/htdocs/blog&gt;
     FallbackResource /blog/index.php
 &lt;/Directory&gt;
+&lt;Directory /web/example.com/htdocs/blog/images&gt;
+    FallbackResource disabled
+&lt;/Directory&gt;
     </highlight>
 </usage>
 </directivesynopsis>

Modified: httpd/httpd/branches/2.4.x/modules/mappers/mod_dir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/mappers/mod_dir.c?rev=1416585&r1=1416584&r2=1416585&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/mappers/mod_dir.c (original)
+++ httpd/httpd/branches/2.4.x/modules/mappers/mod_dir.c Mon Dec  3 16:43:47 2012
@@ -162,7 +162,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 FallbackResource points to something that doesn't exist,



Mime
View raw message