Bug 63214 - Using JkAutoAlias, Filenames with Spaces Cannot be found
Summary: Using JkAutoAlias, Filenames with Spaces Cannot be found
Status: NEW
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: mod_jk (show other bugs)
Version: 1.2.46
Hardware: Other Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-27 16:48 UTC by Ken
Modified: 2019-06-16 16:16 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken 2019-02-27 16:48:05 UTC
Using the JkAutoAlias functionality to automatically include Tomcat content so that static files can be served by httpd.

Any file (in the tomcat app directories) that contains one or more spaces results in a 404 being returned from the server.  It appears that the space is being encoded to %20 in mod_jk.c, resulting in the filename not being found on the server.  Specifically, there is logic in mod_jk.c, at about line 3936 (jk_translate function) that utilizes ap_os_escape_path.  The resulting escaped url is concatenated with the tomcat directory path and stored back into the request_rec->filename. That filename, with one or more %20, eventually fails a stat and results in the 404.

Files with spaces that don't go through the jk_translate function are not impacted and are served as expected.