Bogdan Ciprian Pistol wrote:
On Dec 12, 2007 4:19 AM, Tuure Laurinolli <[EMAIL PROTECTED]> wrote:

the HTTP specification says that the last chunked should be a zero
body size chunk.

This is how END_TOKEN is handled by me.

It is the ChunkedHttpMessage that keeps its state, whether it's the
first message or not, if the encoder would do this then I guess that
you couldn't simultaneously send standard HTTP and chunked HTTP with
the same encoder

I was a bit unclear in my original post. The state of the encoding is naturally kept in the IoSession, not the encoder.

On the whole your whole implementation sounds fairly similar to mine. Instead of such a trivial implementation, I think the ideas in ASYNCWEB-21 would provide some nice abstractions (like the possibility of IoFilter-like functionality for decoding protocol messages from the HTTP bodies). Care would have to be taken not to complicate the common case of simple requests/responses that don't need streaming needlessly, though.

Tuure Laurinolli

Reply via email to