From: Joshua Slive Date: Thu, 13 Dec 2001 21:39:28 +0000 (+0000) Subject: Update the AcceptPathInfo docs and add references from upgrading and X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=591e3c572ac19b4178c2f5928a516a1729c9c2a0;p=apache Update the AcceptPathInfo docs and add references from upgrading and mod_include docs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92461 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/core.html b/docs/manual/mod/core.html index ec332498be..dae5d6e8a6 100644 --- a/docs/manual/mod/core.html +++ b/docs/manual/mod/core.html @@ -146,42 +146,64 @@

AcceptPathInfo directive

Syntax: AcceptPathInfo On|Off
+ rel="Help">Syntax: AcceptPathInfo On|Off|Default
+ Default: + AcceptPathInfo Default
Context: all
+ rel="Help">Context: server config, virtual host, + directory, .htaccess
Status: core
- Default: - Varies by handler, see below
Compatibility: AcceptPathInfo is only available in Apache 2.0.30 and later -

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 /test/here.html/more and - /test/nothere.html/more both collect /more - as PATH_INFO.

- -

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, /test/here.html/more - 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.

- -

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.

- -

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:

+

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.

+ +

For example, assume the location /test/ points to + a directory that contains only the single file + here.html. Then requests for + /test/here.html/more and + /test/nothere.html/more both collect + /more as PATH_INFO.

+ +

The three possible arguments for the + AcceptPathInfo directive are:

+
+
off
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 + /test/here.html/more in the above example will return + a 404 NOT FOUND error.
+ +
on
A request will be accepted if a + leading path component maps to a file that exists. The above + example /test/here.html/more will be accepted if + /test/here.html maps to a valid file. + +
default
The treatment of requests with + trailing pathname information is determined by the handler responsible for the request. + The core handler for normal files defaults to rejecting PATH_INFO. + Handlers that serve scripts, such as cgi-script and isapi-isa, generally accept PATH_INFO by + default.
+
+ +

The primary purpose of the AcceptPathInfo + 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 filter, such + as INCLUDES, 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:

 <Files "mypaths.shtml">
     Options +Includes
diff --git a/docs/manual/mod/mod_include.html b/docs/manual/mod/mod_include.html
index 75497ab237..b8f187b99d 100644
--- a/docs/manual/mod/mod_include.html
+++ b/docs/manual/mod/mod_include.html
@@ -41,8 +41,9 @@
       
  • XBitHack
  • -

    See also: Options and SetOutputFilter.

    +

    See also: Options, SetOutputFilter, + and AcceptPathInfo.

    Enabling Server-Side Includes

    @@ -476,6 +477,15 @@ There is a document which describes how to use the features of mod_include to offer internationalized customized server error documents. + +

    PATH_INFO with Server Side Includes

    + +

    Files processed for server-side includes no longer accept + requests with PATH_INFO (trailing pathname information) by + default. You can use the AcceptPathInfo directive to + configure the server to accept requests with PATH_INFO.

    +

    XBitHack diff --git a/docs/manual/upgrading.html.en b/docs/manual/upgrading.html.en index a71b37ac2b..001cb52349 100644 --- a/docs/manual/upgrading.html.en +++ b/docs/manual/upgrading.html.en @@ -53,6 +53,19 @@ proxy access control is now placed inside a <Proxy> block rather than a <Directory proxy:> block. +
  • 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 INCLUDES are implemented on top + of the core handler, and therefore reject requests with + PATH_INFO. You can use the AcceptPathInfo 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.
  • +
  • The CacheNegotiatedDocs directive now takes the argument on or off. Existing instances of CacheNegotiatedDocs should be