-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RESTEasy] enabling GZIP compression results in corrupted chunked response #18469
Comments
This sounds like netty/netty#11358 Unfortunately it has not made it into a released version of Netty yet. |
@geoand could we include the netty |
That's up to @cescoffier to decide |
We can try with Netty 4.1.67. However, updating netty is never a peaceful journey. I will open a PR tomorrow to see how far it goes. |
Describe the bug
A REST endpoint returns a corrupted data when GZIP compression is enabled on the endpoint but it's returning a chunked and uncompressed response.
Here is a sample code to reproduce.
When you run this app with
./gradlew quarkusDev -Dquarkus.http.enable-compression=true
and callGET /hello
without specifyingAccept-Encoding
header, it returns a corrupted JSON like the following.Calling the endpoint with
Accept-Encoding: gzip
returns a correct response.Also, calling the same endpoint again results in some error ("connection timeout" or "invalid chunk size")
Expected behavior
The endpoint should return a "valid" JSON.
Actual behavior
The endpoint returns a corrupted data.
Also, calling the same endpoint again results in some error ("connection timeout" or "invalid chunk size")
To Reproduce
Steps to reproduce the behavior:
MyResource.hello()
as follows (to produce a large enough response that needs to be chunked)../gradlew quarkusDev -Dquarkus.http.enable-compression=true
curl localhost:8080/hello
Configuration
quarkus.http.enable-compression=true
Environment:
Output of
uname -a
orver
Darwin M-Q636 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "15.0.2" 2021-01-19
OpenJDK Runtime Environment (build 15.0.2+7-27)
OpenJDK 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)
Quarkus version or git rev
2.0.0-FINAL
Also reproduceable in 1.13.4.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 6.8.3
The text was updated successfully, but these errors were encountered: