[undertow-dev] Fwd: Undertow Gzip Content-Encoding with Chuncked Transfer-Encoding
Antoine Girard
antoine.girard at ymail.com
Mon Oct 10 04:39:08 EDT 2016
Hi Stuart,
Thanks for your response. It worked.
Best regards,
Antoine
On Mon, Oct 10, 2016 at 9:13 AM, Stuart Douglas <sdouglas at redhat.com> wrote:
> The max-content-size predicate will always return false for chunked
> encoding. You need something like 'exists(%{o,Transfer-encoding}) or
> max-content-size(5)'.
>
> Stuart
>
> On Sun, Oct 9, 2016 at 10:55 PM, Antoine Girard
> <antoine.girard at ymail.com> wrote:
> > Dear Undertow devs,
> >
> > I originally posted the below question on the Wildfly forum and was
> advised
> > to do it here instead.
> >
> > I am using the Undertow EncodingHandler with a Gzip Encoding provider, as
> > follows (sample code taken from an Undertow unit test):
> >
> >
> >
> > final EncodingHandler handler =
> > new EncodingHandler(new ContentEncodingRepository()
> > .addEncodingHandler("gzip",
> > new GzipEncodingProvider(), 50,
> > Predicates.parse("max-content-size[5]")))
> > .setNext(path);
> >
> >
> >
> > It works fine for very small response bodies, however, when Undertow
> starts
> > to use the Chunked Transfer-Encoding, the Gzip compression is simply
> > ignored.
> >
> > My question is basically: how to apply a Gzip encoding (or other
> > compression) before Undertow starts chunking the response?
> >
> >
> > Could it be a bug?
> >
> >
> > Also, and I could not really track it down from the source code, how does
> > Undertow decide to start chunking the response?
> >
> >
> > Thanks in advance!
> >
> >
> > Cheers,
> >
> > Antoine
> >
> >
> >
> > _______________________________________________
> > undertow-dev mailing list
> > undertow-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/undertow-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20161010/fd484791/attachment.html
More information about the undertow-dev
mailing list