Index: util/java/org/apache/tomcat/util/buf/B2CConverter.java
===================================================================
--- util/java/org/apache/tomcat/util/buf/B2CConverter.java	(revision 568320)
+++ util/java/org/apache/tomcat/util/buf/B2CConverter.java	(working copy)
@@ -82,7 +82,7 @@
     {
         try {
             // read from the reader
-            while( true ) { // conv.ready() ) {
+            while( iis.available()>0 ) { // conv.ready() ) {
                 int cnt=conv.read( result, 0, BUFFER_SIZE );
                 if( cnt <= 0 ) {
                     // End of stream ! - we may be in a bad state
@@ -251,7 +251,12 @@
     public  final int read() throws IOException {
         return (pos < end ) ? (buf[pos++] & 0xff) : -1;
     }
+    
+    public int available() throws IOException {
+        return end-pos;
+    }
 
+
     // -------------------- Internal methods --------------------
 
     void setBuffer( byte b[], int p, int l ) {
