users@grizzly.java.net

Re: Grizzly 2.2.1 StaticHttpHandler with Last-Modified and gzip

From: Ryan Lubke <ryan.lubke_at_oracle.com>
Date: Mon, 12 Mar 2012 16:56:38 -0700

On 3/12/12 4:30 PM, james_at_jamesward.org wrote:
> https://github.com/jamesward/jaxrsbars/blob/master/src/main/java/com/ja
> mesward/jaxrsbars/BarServer.java
You can enable compression per NetworkListener:

       NetworkListener.setCompression("on");

You can control compression behavior using the following:

      // Comma separated list of mime types which may be compressed
      NetworkListener.setCompressableMimeTypes(String)

      // minimum size, in bytes, a resource must be before being considered
      // for compression
      NetworkListener.setMinCompressionSize(int)

      // Comma separated list of user-agents to which compressed content
should
      // not be sent.
      NetworkListener.setNoCompressionUserAgents(String)


As far as the Last-Modified question, StaticResourceHandler currently
doesn't set this header.
Please log an enhancement request so that we can address this.