Salut,
Vivek Pandey wrote:
> I use GlassFish v3 kernel/grizzly inside GlassFish gem. There is issue
> dealing with Grizzly caching behavior. One of my user reports that HTTP
> caching is not working.
For the last year File Caching was broken on v3.
For each of the cached resources in the browser,
> where an Apache or Mongrel server will send right caching headers and
> ETag so that the client side cache can use it so that server can send
> 304 (not modified). GlassFish v3 server/Grizzly always sends 200 OK with
> the static resource.
Right. That's because you are using the StaticResourceAdapter, which
doesn't support 304
>
> Is HTTP cache control behavior support in the file-cache feature?
No.
I just
> checked out the code and dont think its fully supported. For example
> there can be a case where a client can send ETag and If-modified-since
> header, to which the server can send 304 indicating the cache is still
> fresh. Maybe I missed something but can someone confirm if full HTTP
> caching is going to be supported?
It may work once we integrate 1.9.18, but the behavior you are asking
will not, e.g Grizzly will always return 200. The Etag/if-modified-size
are derived from the domain.xml configuration.
>
> Also, Ruby support is achieved thru a implementation of GrizzlyAdapter.
> Jeanfrancois indicated file-cache is going to work with it.
Ya sometimes I say some strange things :-)
I still am
> not sure, how do I indicate Grizzly where the static resources are kept?
> Will my current code work with it:
>
> this.setHandleStaticResources(true);
> this.setRootFolder(config.appRoot() + File.separator+"public");
>
>
> If not then how to I tell Grizzly where to serve the files?
I think we need more work to make it work with JRuby. Invoking the above
will now works as right now we do some special processing for the
WebContainer, and by default we cache file located under:
> String docroot = System.getProperty("com.sun.aas.instanceRoot")
> + File.separatorChar + "applications";
> String uri = req.requestURI().toString();
which represent the location of the exploded war file. Does JRuby
application when deployed goes under that directory as well? In any
case, file an issue in GlassFish as I doubt it will works right now.
A+
--Jeanfrancois
>
> -vivek.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>