users@grizzly.java.net

Re: Sending response headers from a filter

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 25 Aug 2008 17:47:12 -0400

Salut,

Igor Minar wrote:
> I played with the code a bit more and I realized that when the doFilter
> method returns true, the headers get sent to the client properly. Not
> sure if this is a feature or a bug, but I think it's ok for my filter to
> return true from this method.

I will improve the documentation. Mainly, you must return true to tell
Grizzly to commit the response. When returning false you Grizzly will
not commit the response, hence the situation you ended up :-)



>
> The new problem I now have is that response.reset() seems to reset only
> response headers, the response OutputBuffer seems to be intact. So if
> something has been written into the response (but not committed yet),
> there appears to be no easy way to get rid of it.
>
> Am I missing something?


Hum... I guess you have found a bug. Can you share a test case? Better,
can you file an issue here:

https://grizzly.dev.java.net/issues/

Thanks!

-- Jeanfrancois



>
> thanks,
> Igor
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>