Hi John,
Great thanks for your time and help!
For the HttpRequestFilter.execute(), which wraps the ch.write(...), being
called many times problem, I solved it by guarding Context.getCurrentOp(),
something like this:
HttpRequestFilter.execute() {
if (ctx.getCurrentOp() != OP_WRITE) {
return true;
}
}
Driven by switching OP_WRITE, OP_READ correctly, getting back to the
original expectation of this mail after replacing grizzly sources :-(, it
works as expected.
Thanks again!
Regards,
-Yi Bing
2008/6/17 John ROM <snake-john_at_gmx.de>:
> Hi Yi,
> maybe I was too short in my last post.
> But the next two days I just do not have any spare time.
>
> As you said I do think you are "thinking in a wrong way."
>
> When getting bytes from the ByteBuffer in your HttpResponseParserFilter
> you can't be sure if the whole message is already ready.
>
> The Filters in the Chain might be called many times before you have gotten
> the full Response from the Http-Server.
>
> Mabe it works better for you to not place the
> ch.write(ByteBuffer.wrap("GET /\r\nHTTP 1.0/1.1\r\n\r\n".getBytes()),
> in the Filterchain ....
>
> many greetings John
>
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört?
> Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>