MeteoGroup / jbrotli

The repo has been migrated to Bitbucket https://bitbucket.org/dtnse/jbrotli/src/master/ and archived
Apache License 2.0
93 stars 21 forks source link

Truncated result #14

Open ben-manes opened 7 years ago

ben-manes commented 7 years ago

When returning a large json, it appears that the response is truncated when Brotli is used (but works fine with gzip). The integration isn't doing anything fancy - its RestEasy (Jax-rs), Guice, and Jackson. Brotli was added as,

filter("/*").through(BrotliServletFilter.class);
bind(BrotliServletFilter.class).asEagerSingleton();

For small payloads it works perfectly, but for a large one it returns back content-length:21949 which is probably incorrect.

ben-manes commented 7 years ago

It seems to be forced by Jetty in org.eclipse.jetty.http.HttpGenerator.putContentLength(ByteBuffer, long)

Though I'm not sure why.

nitram509 commented 7 years ago

Hi Ben,

thank you for this feedback. May I ask you to provide a shot Github ghist example code, where I can test this scenario?

Thanks in advance.