https://bz.apache.org/bugzilla/show_bug.cgi?id=60013

--- Comment #5 from santhanapreeth...@gmail.com ---
I tested by encoding the querystring in the RewriteValve

if (queryString != null) 
{  
     request.getCoyoteRequest().queryString().setString(null);
     chunk = request.getCoyoteRequest().queryString().getCharChunk();
     chunk.recycle();
     //chunk.append(queryString);
     // encode queryString 
     chunk.append(URLEncoder.DEFAULT.encode(queryString));
     request.getCoyoteRequest().queryString().toChars();
}

I found that = and & in the querystring also was getting encoded 
I had to decode the encoded = and & to get it to work as expected.

     String encQueryString = URLEncoder.DEFAULT.encode(queryString);
     encQueryString = encQueryString.replaceAll("%3D","=");
     encQueryString = encQueryString.replaceAll("%26","&");
     chunk.append(encQueryString);

After making these changes the URL rewriting was working fine 

Access log 

/xyz.do?param=%E5%9C%A8%E7%BA%BF%E6%B5%8B%E8%AF%95

I wrote a test jsp and request.getParameter was working fine and retrieved the
non-ASCII data with both GET and POST methods 

Because the rewritten and done flags are set in case of redirect, the issue
still remain when there is a redirect.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to