quarkus: GZip filter doesn't work
Describe the bug I followed the steps in https://quarkus.io/guides/rest-json#gzip-support but the filter doesn’t seem to be activated.
Expected behavior Content will be compressed as GZIP
Actual behavior No GZIP compression
To Reproduce Steps to reproduce the behavior:
- Create any endpoint with code.quarkus.io
- Add
quarkus.resteasy.gzip.enabled=true
to application.properties - Run
http localhost:8080/hello Content-Encoding:gzip Accept-Encoding:gzip
Configuration
quarkus.resteasy.gzip.enabled=true
Environment (please complete the following information):
- Output of
uname -a
orver
: Fedora 32 - Output of
java -version
: OpenJDK 11 - GraalVM version (if different from Java):
- Quarkus version or git rev: 1.5.0.Final
- Build tool (ie. output of
mvnw --version
orgradlew --version
): Maven 3.6.3
Additional context
It looks like the Content-Encoding
and Accept-Encoding
headers are not propagated to the internal Vert.x Request, thus making org.jboss.resteasy.plugins.interceptors.GZIPEncodingInterceptor
ignore the request to GZIP the output
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 38 (28 by maintainers)
Commits related to this issue
- Update doc around Resteasy GZIP support Fixes #9671 — committed to stuartwdouglas/quarkus by stuartwdouglas 3 years ago
- Update doc around Resteasy GZIP support Fixes #9671 — committed to gsmet/quarkus by stuartwdouglas 3 years ago
Hello everyone. First of all: +1 for this topic. The workaround from @dfa1 does not work for me, the interceptor methods are called in a wrong Order (aroundWriteTo first), which is kind of confusing to me…
Nevertheless I rewrote a workaround which is working for me (even shorter):
As a temporary workaround I’m using the following code since June:
@geoand do we have a GZip filter in RESTEasy Reactive?
@StFS Attached PR incoming. This should fix a lot of config issues for Resteasy Standalone. You’ll configure via application.properties
@jessequinn @gastaldi That line in the resteasy interceptor looks correct
In this case the headers being checked are response headers not request headers. When accepting gzip from a request the server should respond with the headers Content-Encoding: gzip
@liweinan, can you check this please?
I would like to work on that.