Fix some issues back-porting the bug 56334 test case

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