Add code to read from the internal buffer first, the upgrade transition has leftover bytes and is not manageable otherwise.
Add code to read from the internal buffer first, the upgrade transition has leftover bytes and is not manageable otherwise.

git-svn-id: 79cef5a5a257cc9dbe40a45ac190115b4780e2d0@1818575 13f79535-47bb-0310-9956-ffa450edef68

apache/tomcat,apache/tomcat,apache/tomcat,apache/tomcat,apache/tomcat