Backport test case for BZ 54928.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54928

Merged revisions r1485862 r1486062 r1580030 r1580849 r1580869
r1590377 r1590402 r1590635 r1590638 r1633936 r1633974 r1634257 and r1634258.


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