Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56573
Restore query string.
Add test cases.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1600665 13f79535-47bb-0310-9956-ffa450edef68
Suppress an IDE warning. No functional change.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1600669 13f79535-47bb-0310-9956-ffa450edef68
Remove unused code from a test class.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1600671 13f79535-47bb-0310-9956-ffa450edef68