https://bz.apache.org/bugzilla/show_bug.cgi?id=60013
Bug ID: 60013
Summary: Non-ASCII characters in querystring get mangled after
URL Rewrite using RewriteValve
Product: Tomcat 8
Version: 8.0.35
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: major
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
I have RewriteValve configured for the ROOT context which is the only context
in my deployment setup.
I have many RewriteRules like
RewriteRule ^/abc/(.*)$ /xyz.do?param=$1 [L]
where a part of the URL gets rewritten as querystring
when I access the URL with non-ASCII characters like
http://www.example.com/abc/在线测试
The page does not load. Checking the rewrite and access logs I found
Rewrite Log
Rewrote /abc/在线测试 as /xyz.do?param=在线测试 with rule pattern ^/abc/(.*)$
Access log
/xyz.do?param=????
This issue only happens when a part of the URL gets rewritten as the
querystring. Checking the source code of the RewriteValve
chunk.append(URLEncoder.DEFAULT.encode(urlString));
I found the querystring is not encoded. Is this the cause of the problem?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]