Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] gzip filter not being applied in some cases

Hi Jan,

Thanks for your reply, I think you are right, it's handling the case when the user is setting Content-Encoding manually.

In my scenario GzipStream.doGzip() calls GZipStream.setContentEcoding() which will call the block we are talking about, setting the noGzip() flag.

Seems the problem is that the gzip filter should be allowed a different path to setting the "Content-Encoding", without disabling itself.

Regards,
Eduard

On Mon, Oct 22, 2012 at 2:15 AM, Jan Bartel <janb@xxxxxxxxxxx> wrote:
Eduard,

I think those code lines are testing if the user has tried to set the
content-encoding manually, rather than let the filter set the
content-type to the configured compression type. If the content hasn't
been committed, we tell the filter not to compress, as the user is
obviously doing their own thing.

Jan

On 20 October 2012 00:20, Eduard Weissmann <edi.weissmann@xxxxxxxxx> wrote:
> Hi,
>
> I'm experiencing an issue using the GZip filter, which doesn't get applied
> when the response is larger.
> It looks a lot like the description of bug
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=354014
> I'm using jetty 7.5.4, where that bug is fixed.
>
> Debugging through the jetty code, I saw this decision being made:
>
> (GzipResponseWrapper line 213)
> if (!isCommitted()){
>   noGzip();
> }
>
> I was wondering, shouldn't it be other way around? if the response is
> already commited, then it's too late to gzip it
> PS: this code has slightly changed on latest version of Jetty, it's now in
> CompressedResponseWrapper line 185 but the logic is the same.
>
> Thanks,
> Eduard
>
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com – Developer advice, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top