Bug 62613 - AcceptPathInfo is ignored when using type maps
Summary: AcceptPathInfo is ignored when using type maps
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_negotiation (show other bugs)
Version: 2.4.34
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2018-08-09 13:59 UTC by Jose Kahan
Modified: 2018-08-09 14:02 UTC (History)
0 users

files for duplicating the issue (includes .htaccess) (948 bytes, application/zip)
2018-08-09 13:59 UTC, Jose Kahan

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Kahan 2018-08-09 13:59:13 UTC
Created attachment 36081 [details]
files for duplicating the issue  (includes .htaccess)

Given the following structure (sent as a .zip file):


with the .htaccess content as follows:
AddHandler type-map .var
MultiviewsMatch any
AcceptPathInfo Off

and the type map content (hello.txt.var) as follows:
URI: hello.txt

Content-Language: en
Content-Type: text/plain
URI: files/hello.en.txt

Content-Language: fr
Content-Type: text/plain
URI: files/hello.fr.txt

The following URLs work as expected:

GET '-H Accept-Language: en'  http://localhost/apache_test/hello.txt
GET '-H Accept-Language: fr'  http://localhost/apache_test/hello.txt
GET '-H Accept-Language: fr'  http://localhost/apache_test/hello
GET '-H Accept-Language: fr'  http://localhost/apache_test/files/hello

However, even though AcceptPathInfo is disabled, the following URLs
surprisingly also work although expected to fail:

GET '-H Accept-Language: en'  http://localhost/apache_test/hello.txt/foo
GET '-H Accept-Language: en'  http://localhost/apache_test/hello/foo
GET '-H Accept-Language: fr'  http://localhost/apache_test/hello/foo/bar
GET '-H Accept-Language: fr'  http://localhost/apache_test/hello/jose/foo/bar/mon/day/

This issue happens regardless of the value of AcceptPathInfo.

In contrast, the following one, which doesn't depend on the type map fails as

GET '-H Accept-Language: fr'  http://localhost/apache_test/files/hello/foo

It semss that somewhere in the pile, the request path info
Comment 1 Jose Kahan 2018-08-09 14:02:12 UTC
My last sentence is incomplete: it seems that somewhere during the handling of the request between multiviews and the type map either the acceptpath info config variable is not checked or the internal request structure is changed in a way that doesn't allow to detect it further on along, maybe something related to the internal redirect.