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):
1. final EncodingHandler handler =
2. new EncodingHandler(new ContentEncodingRepository()
3. .addEncodingHandler("gzip",
4. new GzipEncodingProvider(), 50,
5. Predicates.parse("max-content-size[5]")))
6. .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