mod jk - Apache not forwarding URLs containing semicolon to Tomcat (AH00128: File does not exist) -
we have apache 2.4 fronting tomcat via mod_jk.
when request "/abc/def/ghi/e380297.rhd" gets submitted mod_rewrite prepends web application context path "web" resulting in "/web/abc/def/ghi/e380297.rhd". afterwards request correctly passed thru tomcat.
but semicolon inserted in of path segments of url, e.g. "/abc/de;f/ghi/e380297.rhd", apache not pass request tomcat tries resource itself. not exist (ah00128: file not exist) return 404.
mod_rewrite.c(475): [client 10.129.76.100:64002] 10.129.76.100 - - [x/sid#15e65d8][rid#405d670/initial] init rewrite engine requested uri /abc/de;f/ghi/e380297.rhd mod_rewrite.c(475): [client 10.129.76.100:64002] 10.129.76.100 - - [x/sid#15e65d8][rid#405d670/initial] applying pattern '^/(.*)' uri '/abc/de;f/ghi/e380297.rhd' mod_rewrite.c(475): [client 10.129.76.100:64002] 10.129.76.100 - - [x/sid#15e65d8][rid#405d670/initial] rewritecond: input='/abc/de;f/ghi/e380297.rhd' pattern='!^/web/.*$' => matched mod_rewrite.c(475): [client 10.129.76.100:64002] 10.129.76.100 - - [x/sid#15e65d8][rid#405d670/initial] rewritecond: input='/abc/de;f/ghi/e380297.rhd' pattern='!^/content/.*$' => matched mod_rewrite.c(475): [client 10.129.76.100:64002] 10.129.76.100 - - [x/sid#15e65d8][rid#405d670/initial] rewrite '/abc/de;f/ghi/e380297.rhd' -> '/web/abc/de;f/ghi/e380297.rhd' mod_rewrite.c(475): [client 10.129.76.100:64002] 10.129.76.100 - - [x/sid#15e65d8][rid#405d670/initial] forcing '/web/abc/de;f/ghi/e380297.rhd' passed through next api uri-to-filename handler mod_authz_core.c(802): [client 10.129.76.100:64002] ah01626: authorization result of require granted: granted mod_authz_core.c(802): [client 10.129.76.100:64002] ah01626: authorization result of <requireany>: granted request.c(238): [client 10.129.76.100:64002] request authorized without authentication access_checker_ex hook: /web/abc/de;f/ghi/e380297.rhd client 10.129.76.100:64002] ah00128: file not exist: /xxx/webroot/webapps/web/abc/de;f/ghi/e380297.rhd ... http_filters.c(1008): [client 10.129.76.100:64002] response sent status 404, headers:
why apache behave , can rectify this?
edit:
i looked @ mod_jk log file , found:
[debug] jk_map_to_storage::mod_jk.c (3798): no match /web/abc/de;f/ghi/e380297.rhd found
so looks if apache passing request thru mod_jk mod_jk not find mapping, strange me have mount defined:
jkmount /*.rhd ajp13
even more interesting when use following url
/abc/de.rhd;f/ghi/e380297.rhd
the request passed tomcat.
so mod_jk correctly regards semicolon start of path parameter (see http://doriantaylor.com/policy/http-url-path-parameter-syntax) next "/" not start next path segment mod_jk (not sure if correct or incorrect) never sees url ends in mounted extension ".rhd".
Comments
Post a Comment