]> granicus.if.org Git - apache/commitdiff
Update the AcceptPathInfo docs and add references from upgrading and
authorJoshua Slive <slive@apache.org>
Thu, 13 Dec 2001 21:39:28 +0000 (21:39 +0000)
committerJoshua Slive <slive@apache.org>
Thu, 13 Dec 2001 21:39:28 +0000 (21:39 +0000)
mod_include docs.

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

docs/manual/mod/core.html
docs/manual/mod/mod_include.html
docs/manual/upgrading.html.en

index ec332498beae096353f7bd8ede46e34f88f3ab66..dae5d6e8a6b4fd32bfcc91ea47124da2cbf243e0 100644 (file)
     <h2><a id="acceptpathinfo"
     name="adddefaultcharset">AcceptPathInfo directive</a></h2>
     <a href="directive-dict.html#Syntax"
-    rel="Help"><strong>Syntax:</strong></a> AcceptPathInfo On|Off<br />
+    rel="Help"><strong>Syntax:</strong></a> AcceptPathInfo On|Off|Default<br />
+     <a href="directive-dict.html#Default"
+    rel="Help"><strong>Default:</strong></a>
+    <code>AcceptPathInfo Default</code><br />
      <a href="directive-dict.html#Context"
-    rel="Help"><strong>Context:</strong></a> all<br />
+    rel="Help"><strong>Context:</strong></a> server config, virtual host,
+    directory, .htaccess<br />
      <a href="directive-dict.html#Status"
     rel="Help"><strong>Status:</strong></a> core<br />
-     <a href="directive-dict.html#Default"
-    rel="Help"><strong>Default:</strong></a>
-    <code>Varies by handler, see below</code><br />
      <a href="directive-dict.html#Compatibility"
     rel="Help"><strong>Compatibility:</strong></a>
     AcceptPathInfo is only available in Apache 2.0.30 and later 
 
-    <p>This directive provides the ability to accept or reject requests
-    that contain PATH_INFO, or trailing pathname information that follows
-    an actual filename (or non-existant file in an existing directory).
-    For example, if the location /test/ points to a directory, and the
-    file here.html exists, while the file nothere.html does not exist,
-    the requests for <code>/test/here.html/more</code> and 
-    <code>/test/nothere.html/more</code> both collect <code>/more</code> 
-    as PATH_INFO.</p>
-
-    <p>By default, the core handler for normal files rejects any
-    PATH_INFO with an error 404 NOT FOUND, since the file does not
-    exist (in our example above, <code>/test/here.html/more</code>
-    is not a file name.)  Other handlers that serve scripts, such as 
-    mod_cgi, mod_cgid and mod_isapi, generally accept PATH_INFO by 
-    default.</p>
-
-    <p>You may override the default behavior of any Apache module, and 
-    possibly third party modules, with the AcceptPathInfo directive.
-    It is up to the individual module to respect your override.</p>
-
-    <p>This override is required, for example, when you use a filter,
-    such as mod_includes, to generate content based on PATH_INFO.  The
-    core module would usually reject the request, so you could use the
-    following configuration to enable such a script:</p>
+    <p>This directive controls whether requests that contain trailing
+    pathname information that follows an actual filename (or
+    non-existent file in an existing directory) will be accepted or
+    rejected.  The trailing pathname information can be made
+    available to scripts in the PATH_INFO environment variable.</p>
+
+    <p>For example, assume the location <code>/test/</code> points to
+    a directory that contains only the single file
+    <code>here.html</code>.  Then requests for
+    <code>/test/here.html/more</code> and
+    <code>/test/nothere.html/more</code> both collect
+    <code>/more</code> as PATH_INFO.</p>
+
+    <p>The three possible arguments for the
+    <code>AcceptPathInfo</code> directive are:</p>
+    <dl>
+    <dt><code>off</code></dt><dd>A request will only be accepted if it
+    maps to a literal path that exists.  Therefore a request with
+    trailing pathname information after the true filename such as
+    <code>/test/here.html/more</code> in the above example will return
+    a 404 NOT FOUND error.</dd>
+
+    <dt><code>on</code></dt><dd>A request will be accepted if a
+    leading path component maps to a file that exists.  The above
+    example <code>/test/here.html/more</code> will be accepted if
+    <code>/test/here.html</code> maps to a valid file.</dt>
+    
+    <dt><code>default</code><dd>The treatment of requests with
+    trailing pathname information is determined by the <a
+    href="../handlers.html">handler</a> responsible for the request.
+    The core handler for normal files defaults to rejecting PATH_INFO.
+    Handlers that serve scripts, such as <a
+    href="mod_cgi.html">cgi-script</a> and <a
+    href="mod_isapi.html">isapi-isa</a>, generally accept PATH_INFO by
+    default.</dd>
+    </dl>
+
+    <p>The primary purpose of the <code>AcceptPathInfo</code>
+    directive is to allow you to override the handler's choice of
+    accepting or rejecting PATH_INFO.  This override is required, for
+    example, when you use a <a href="../filter.html">filter</a>, such
+    as <a href="mod_include.html">INCLUDES</a>, to generate content
+    based on PATH_INFO.  The core handler would usually reject the
+    request, so you can use the following configuration to enable
+    such a script:</p>
 <pre>
 &lt;Files "mypaths.shtml"&gt;
     Options +Includes
index 75497ab2374d47c948dbf4af4b4b71c56c4abf69..b8f187b99db7d4bc25dbdb419fdd16352ed659de 100644 (file)
@@ -41,8 +41,9 @@
       <li><a href="#xbithack">XBitHack</a></li>
     </ul>
 
-    <p>See also: <a href="core.html#options">Options</a> and <a
-    href="core.html.html#SetOutputFilter">SetOutputFilter</a>.</p>
+    <p>See also: <a href="core.html#options">Options</a>, <a
+    href="core.html.html#SetOutputFilter">SetOutputFilter</a>,
+    and <a href="core.html#acceptpathinfo">AcceptPathInfo</a>.</p>
 
     <h2>Enabling Server-Side Includes</h2>
 
     There is <a href="../misc/custom_errordocs.html">a document</a>
     which describes how to use the features of mod_include to offer
     internationalized customized server error documents. 
+
+    <h2>PATH_INFO with Server Side Includes</h2>
+
+    <p>Files processed for server-side includes no longer accept
+    requests with PATH_INFO (trailing pathname information) by
+    default.  You can use the <a
+    href="core.html#AcceptPathInfo">AcceptPathInfo</a> directive to
+    configure the server to accept requests with PATH_INFO.</p>
+
     <hr />
 
     <h2><a id="xbithack" name="xbithack">XBitHack</a>
index a71b37ac2b923d6fdab05ab847cb43981c0b4607..001cb52349cf44f072fce0ca4e0cfe5b121e7d4d 100644 (file)
       proxy access control is now placed inside a &lt;Proxy&gt; block
       rather than a &lt;Directory proxy:&gt; block.</li>
 
+      <li>The handling of PATH_INFO (trailing path information after
+      the true filename) has changed for some modules.  Modules
+      that were previously implemented as a handler but are now
+      implemented as a filter may no longer accept requests with
+      PATH_INFO.  Filters such as <a
+      href="mod/mod_include.html">INCLUDES</a> are implemented on top
+      of the core handler, and therefore reject requests with
+      PATH_INFO.  You can use the <a
+      href="core.html#acceptpathinfo">AcceptPathInfo</a> directive to
+      force the core handler to accept requests with PATH_INFO and
+      thereby restore the ability to use PATH_INFO in server-side 
+      includes.</li>
+
       <li>The <code>CacheNegotiatedDocs</code> directive now takes
       the argument <code>on</code> or <code>off</code>. Existing
       instances of <code>CacheNegotiatedDocs</code> should be