Skip to content

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

@mirko-ruggiero

Description

@mirko-ruggiero

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions