https://issues.apache.org/bugzilla/show_bug.cgi?id=56663
Bug ID: 56663 Summary: Can not get all data from InputStream in onDataAvailable Product: Tomcat 8 Version: trunk Hardware: PC OS: Mac OS X 10.4 Status: NEW Severity: major Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: long...@hotmail.com By from ReadListener, I implemented the method onDataAvailable same as below. public void onDataAvailable() throws IOException { byte[] buf = new byte[1024]; int len = 0; try{ while ( _input.isReady() && (len = _input.read(buf)) != -1) { _bufferStream.write(buf, 0, len); } }catch(Exception ex){ logger.debug(ex.getMessage()); } } When I send more than 1024 bytes from client, I can not get all data from method. It will exit the loop by _input.isReady() is false. But when I change the buf size to 2048, I can get all data by this code. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org