hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Berlin <sber...@limepeer.com>
Subject ArrayIndexOutOfBoundsException while reading
Date Thu, 08 Jan 2004 17:45:21 GMT
Hi all,

Under some exceptional circumstances, reading from a SocketInputStream  
can cause an ArrayIndexOutOfBoundsException.  We have seen this occur  
in many other places (non HttpClient related), and since including  
HttpClient a few bugs have been reported with it as well.  The exact  
cause is unknown and not easily reproduced, and the exception actually  
occurs in native code (java.net.SocketInputStream.socketRead0).  I  
suggest adding a wrapper input stream around the underlying inputstream  
that extends all read-style calls, catches  
ArrayIndexOutOfBoundsException and rethrows it as an IOException.

An example bug report demonstrating this bug can be at:  
1&offset=15 .  (Note that we're currently redoing the internals of the  
bug server, so if that link doesn't work, you can reach the bug reports  
yourself by going to http://bugs.limewire.com/bugs/search.jsp ,  
choosing or typing "java.lang.ArrayIndexOutOfBoundsException" as the  
exception to search for, and choosing or typing  
"org.apache.commons.httpclient.HttpParser" as the class that the error  
occurs in.)


To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

View raw message