testn wrote:
> Try setCompression("force") instead of setCompression("on")
> setCompression("on") doesn't quite work with dynamic content.
You are right! I should have recalled based on your email this week. I
think I will reconsider your proposal :-) :-)
Thanks!
-- Jeanfrancois
>
> Paul Sandoz wrote:
>> Hi Arman,
>>
>> I am cross posting to the Grizzly users list, as it might a config
>> issue with the compression set up, or it might be that the compression
>> set up is for transport encoding rather than content encoding.
>>
>> Jersey also has a content encoding filter:
>>
>>
>> https://jersey.dev.java.net/nonav/apidocs/1.1.0-ea/jersey/com/sun/jersey/api/container/filter/GZIPContentEncodingFilter.html
>>
>> Paul.
>>
>> On Jul 7, 2009, at 11:21 AM, Arman Djusupov wrote:
>>
>>> Hello,
>>>
>>> I am testing REST interop between WCF and Jersey + standalone
>>> Grizzly server. Up to now everything works fine, except of
>>> compression which for some reason is not being applied despite
>>> having enabled it.
>>>
>>> I have initialized the standalone Grizzly in the following manner:
>>>
>>> System.out.println("Starting grizzly...");
>>> SelectorThread threadSelector = GrizzlyWebContainerFactory.create(
>>> baseUri, initParams);
>>> threadSelector.setCompression("on");
>>> threadSelector.setCompressableMimeTypes("application/
>>> fastinfoset");
>>> threadSelector.setCompressionMinSize(0);
>>>
>>> System.out.println(String.format(
>>> "Jersey app started with WADL available at
>>> %sapplication.wadl\n” + “Try out %shelloworld\nHit enter to stop
>>> it...", baseUri, baseUri));
>>> System.in.read();
>>>
>>> The client sends a request with the following header:
>>>
>>> GET /tickhistory/?count=1000 HTTP/1.1
>>> VsDebuggerCausalityData:
>>> uIDPo8NPV7XwO0VGi6Vqcn5L7qcAAAAAHgkpNDHfjEGQyOWxx
>>> +Y5qyGawiJz7CdKr295EfxJus8ACQAA
>>> Accept-Encoding: gzip,deflate
>>> Accept: application/fastinfoset,application/xml; charset=utf-8
>>> Content-Type: application/fastinfoset
>>> Host: 192.168.1.22:9998
>>>
>>> Grizzly replies using "application/fastinfoset" as it should (I am
>>> using Fast Infoset as message encoding) but it does not compress the
>>> traffic:
>>>
>>> HTTP/1.1 200 OK
>>> server: grizzly/1.7
>>> Content-Type: application/fastinfoset
>>> Date: Fri, 03 Jul 2009 15:05:37 GMT
>>> Content-Length: 7961
>>>
>>> Do you have any idea how can I enable compression? Or is it not
>>> supported yet?
>>>
>>> With best regards,
>>> Arman
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>>
>>
>