users@grizzly.java.net

Re: Re-open http://java.net/jira/browse/GRIZZLY-1014 perhaps?

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Mon, 16 Jan 2012 14:20:33 +0100

Hi Peter,

the issue GRIZZLY-1014 was reopned and fixed.

Thank you for the feedback.

WBR,
Alexey.

On 01/16/2012 12:54 PM, java.net_at_lenderyou.co.uk wrote:
> Hi,
>
> I'm having a problem with Grizzly 2.2 very similar to the GRIZZLY-1014,
> the file cache has the wrong content type, this is because the file is
> added to the cache before the response is calculated and therefore the
> contentType is null inside the StaticHttpHandler.
>
> I could solve it by swapping the order of the cache and sendFile in the
> handle method of the above handle, which works fine for my low traffic
> site, but I'm not sure if this is the correct way to solve the problem.
>
> i.e. Do this:
>
> sendFile(res, resource);
> addToFileCache(req, resource);
>
> instead of
>
> addToFileCache(req, resource);
> sendFile(res, resource);
>
> Peter