users@grizzly.java.net

Re: SelectorThread.setCompression("on");

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 11 Feb 2008 10:05:47 -0500

Hi Alan,

Alan Williamson wrote:
> Can some explain how outgoing compression is suppose to work within
> Grizzly?
>
> I *think* i may have misunderstood it. I have it set to on, and
> compress anything above 15KB. However nothing is being compressed.
>
> I take it then when i do something like this:
>
> OutputBuffer buffer = response.getOutputBuffer();
> buffer.doWrite(chunk, response);
>
> Grizzly isn't automatically compressing this if the outgoing client
> supports GZIP?

Yes, via its output filter

https://grizzly.dev.java.net/nonav/xref/com/sun/grizzly/tcp/http11/filters/GzipOutputFilter.html
>
> does that mean i have to manage this myself?

No grizzly supports it (at least in GlassFish :-))

http://weblogs.java.net/blog/jfarcand/archive/2006/06/enabling_http_c_1.html

How did you configure it exactly? If it doesn't work, it probably
because of a bug. Last week I've ported some final fix from 1.0 which we
missed. Which version of Grizzly are you using?

Thanks

-- Jeanfrancois



>
> thanks
>