Could you indulge me and try the client with the sleep?

I see the end event when there's a break/delay between sending a chunk
and sending the last chunk.  It is legal http to send the last chunk
separately from preceding chunks, isn't it?

> getting a -1 on a inputstream.read is normal (even for a regular servlet).

The "read error" indicates slightly more: that
inputstream.isAvailable() is >0 and that inputstream.read() returns
-1.  Do I understand correctly in thinking that this -1 can indicate
two different situations: 1) the client sent a last chunk; or 2) the
client socket closed while the server was reading?

If the above is true, it might be nice to have a way to disambiguate
the two situations.  Also, documentation-wise, it might be nice to
comment the servlet code in
http://tomcat.apache.org/tomcat-6.0-doc/aio.html to indicate that the
-1 can occur on a last chunk as well as a read error.  As a new comet
user, I incorrectly took your sample code block (in the aio doc page)
below to mean that a -1 always indicated some kind of error:

} else if (n < 0) {
  error(event, request, response);
  return;
}

Thanks,
Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to