https://bz.apache.org/bugzilla/show_bug.cgi?id=59664

liujian <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |REMIND

--- Comment #3 from liujian <[email protected]> ---
Hi:

sorry about the issuss

i see the code of the org.apache.catalina.connector.InputBuffer
    public int available() {
        int available = 0;
        if (state == BYTE_STATE) {
            available = bb.getLength();
        } else if (state == CHAR_STATE) {
            available = cb.getLength();
        }
        if (available == 0) {
            coyoteRequest.action(ActionCode.AVAILABLE, null);
            available = (coyoteRequest.getAvailable() > 0) ? 1 : 0;
        }
        return available;
    }

    public boolean ready()
        throws IOException {

        if (closed) {
            throw new IOException(sm.getString("inputBuffer.streamClosed"));
        }

        return (available() > 0);
    }


you see,if only one byte in 'bb',the 'ready()' will return 'true'
But for 'Unicode',only one byte can not read success

So, we can not use 'ready()' to get 'Reader' is available or not

i think 'ready()' of 'Reader' should imporve

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to