(NB: Below is a synthetic test; in real world, this breaks hgweb, for example; 
also, for script handlers, meddling with AcceptPathInfo is not needed.)

Consider the following sample configuration:
----------8<----------
Alias /test "${site}/test/test.ssi.txt"
<Location /test>
        AcceptPathInfo on
        Options +Includes
        AddOutputFilter includes .ssi
        Require all granted
</Location>
----------8<----------
The said test file (which is a plain text file containing only "<!--#printenv 
-->"), when invoked as http://example.com/test/path , has the following correct 
environment:
----------8<---------- PART A -- same in this case and in the case below
DOCUMENT_ROOT=/var/www/common/empty
REQUEST_URI=/test/path
QUERY_STRING=
DOCUMENT_URI=/test/path
DOCUMENT_NAME=test.ssi.txt
DOCUMENT_ARGS=
SCRIPT_FILENAME=/var/www/test/test.ssi.txt
----------8<---------- PART B -- going to change in the case below
SCRIPT_NAME=/test
CONTEXT_PREFIX=/test
CONTEXT_DOCUMENT_ROOT=/var/www/test/test.ssi.txt
PATH_INFO=/path
PATH_TRANSLATED=/var/www/common/empty/path
DOCUMENT_PATH_INFO=/path
----------8<----------
However, if the Alias directive is moved into Location:
----------8<----------
<Location /test>
        AcceptPathInfo on
        Alias "${site}/test/test.ssi.txt"
        Options +Includes
        AddOutputFilter includes .ssi
        Require all granted
</Location>
----------8<----------
then the B part of the environment changes to:
----------8<---------- new PART B -- changed
SCRIPT_NAME=/test/path
CONTEXT_PREFIX=
CONTEXT_DOCUMENT_ROOT=/var/www/common/empty
----------8<----------
Id est, the context "/test" is lost, and the attribution of "/path" is changed 
from PATH_INFO to SCRIPT_NAME.
Am I correct to understand that this is an implementation bug; or at very least 
a documentation bug? (since I cannot find anything related under 
https://httpd.apache.org/docs/trunk/mod/mod_alias.html#alias )

(I tested this with httpd.x86_64 version 2.4.23-5.fc25 on Fedora Server, and I 
browsed through the bug tracker to check if this was reported/fixed recently.)

--
βþ

Reply via email to