Skip to content
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

HTTP Compression still not working with quarkus-amazon-lambda-rest dependency #47028

Open
mirko-ruggiero opened this issue Mar 27, 2025 · 4 comments
Labels
area/amazon-lambda kind/bug Something isn't working

Comments

@mirko-ruggiero
Copy link

Describe the bug

HTTP response compression not working in the REST API if quarkus-amazon-lambda-rest maven dependency is added to POM.
Removing the dependency from the POM, the compression works just fine

Expected behavior

Response should be GZIP compressed
Response header Content-Encoding: gzip expected

Actual behavior

No compression and no header

How to Reproduce?

Reproducer :
reproducer.zip

mvn clean compile quarkus:dev
curl -v -i -H "Accept-Encoding: gzip" "http://localhost:8080/hello/"
curl -v -i -H "Accept-Encoding: gzip" "http://localhost:8080/hello/response"

see how response is not compressed and no header is present
remove quarkus-amazon-lambda-rest from POM and rebuild and see how response gets compressed and header is present

Output of uname -a or ver

Linux ********** 6.11.0-19-generic #19~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Feb 17 11:51:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "21.0.6" 2025-01-21 OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-124.04.1) OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-124.04.1, mixed mode, sharing)

Quarkus version or git rev

3.21.0

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937) Java version: 21.0.6, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "6.11.0-19-generic", arch: "amd64", family: "unix"

Additional information

properties to enable compression:

quarkus.http.enable-compression=true
quarkus.http.compress-media-types=application/json,text/html

Same issue has been raised in the past (see here)

@mirko-ruggiero mirko-ruggiero added the kind/bug Something isn't working label Mar 27, 2025
Copy link

quarkus-bot bot commented Mar 27, 2025

/cc @matejvasek (amazon-lambda), @patriot1burke (amazon-lambda)

@gsmet
Copy link
Member

gsmet commented Mar 27, 2025

Yeah, I can see why this is happening. I'll have a look.

@gsmet
Copy link
Member

gsmet commented Apr 3, 2025

I had a look at this one last week.

From what I can see, the Lambda handler doesn't get a compressed output from Quarkus REST but I haven't yet figured out exactly why.

@mirko-ruggiero
Copy link
Author

Thanks for looking into it, looking forward to further updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/amazon-lambda kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants