Remy Maucherat wrote:
Filip Hanik - Dev Lists wrote:
It's the contract of this API (which is blocking IO), it's not me ;)
I hear you loud and clear, although the API doesn't specify as 0
being an illegal value, it is assumed in many places in the code that
the value is either -1 or >0
http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html#read(byte[])
0 is the characteristic of non blocking IO. Reading the javadocs, it
seems obvious 0 is never allowed except for basic argument error cases:
If b is null, a NullPointerException is thrown. If the length of b is
zero, then no bytes are read and 0 is returned; otherwise, there is an
attempt to read at least one byte. If no byte is available because the
stream is at end of file, the value -1 is returned; otherwise, at
least one byte is read and stored into b.
I still don't think CoyoteAdapter.event is the right place for it
either, I think we can do better than that.
Let me experiment a little bit, in the meantime, I still think we
should push out a stable version sooner rather than later.
Ok, I'll try something in the meantime in CoyoteAdapter, since it's
trivial (and I think does all that is needed at this point).
The available() has a side effect, if there is a partial or non valid
chunked header (ie the client also sends some garbage), available()
returns >0, and the read() goes into a forever blocking read as no more
data is coming in.
this was not the case before, as a READ event, you did one read, and
then available returned 0, and you'd be fine until next READ event.
since it's a client data error, I'm ok with it, question is, how common
are these client errors.
I would be ok to tag 6.0.13 before doing any further functional
changes, as it contains numerous bugfixes since 6.0.10.
Let us wait a few days for these available() changes to get some
feedback, then we can tag and go through our stability tests.
Filip
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]