Remy Maucherat wrote:
Henri Gomez wrote:[EMAIL PROTECTED] wrote: > remm 2002/11/05 08:26:38 > > Modified: http11/src/java/org/apache/coyote/http11 > InternalInputBuffer.java > Log: > - I think a 0 result is an error according to the JVM javadocs (we > are using > InputStream.read(byte[], int, int)). Under unix it means that the connection was closed by remote side...
You're not getting an IOE in that case ? That would have caused a loop.
The javadocs are very explicit on this, and 0 shouldn't even happen (I've never seen it on Windows, BTW) :-(
From my experience under Unix, I could say that it happends I got a 0 from a read in a socket connection because the remote closed the connection. I don't know JVM implementators handle the case since man pages say that many 'others error could occurs depending on the object which is read' What I do usually when I read from a socket is to loop until I got a -1 (native/java) or IOE (java). So a Java read() should be valid until you got -1 or IOE. -- To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>