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

Quarkus does not decompress Brotli requests in native mode #43392

Closed
fedinskiy opened this issue Sep 19, 2024 · 3 comments · Fixed by #44348
Closed

Quarkus does not decompress Brotli requests in native mode #43392

fedinskiy opened this issue Sep 19, 2024 · 3 comments · Fixed by #44348
Assignees
Labels
Milestone

Comments

@fedinskiy
Copy link
Contributor

Describe the bug

I have an application which uses brotli for compression of HTTP requests and responses. It works as expected in JVM mode, but in native it fails to decrypt incoming requests.

The method in question looks like this:

    @POST
    @Path("/decompression")
    @Produces(MediaType.TEXT_PLAIN)
    public String decompressionHttpResponse(byte[] compressedData) {
        String decompressedData = new String(compressedData);
        System.out.println(decompressedData);
        return decompressedData;
    }

Expected behavior

Brotli should decompress the input and return the decompressed data (like it does in JVM)

Actual behavior

Brotli returns compressed data

How to Reproduce?

  1. git clone -b brotli-native https://github.com/fedinskiy/reproducer
  2. cd reproducer
  3. mvn clean verify -Dnative # GreetingResourceTest, which is run in JVM succeeds, GreetingResourceIT, which is run the same checks in native fails

Output of uname -a or ver

6.10.4-200.fc40.x86_64

Output of java -version

Java version: 21.0.1, vendor: Eclipse Adoptium

Quarkus version or git rev

3.14.3

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

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)

Additional information

This issue is a follow up to #40533, which used the same cases with slightly different properties

@fedinskiy fedinskiy added the kind/bug Something isn't working label Sep 19, 2024
Copy link

quarkus-bot bot commented Sep 19, 2024

/cc @zakkak (native-image)

@Karm Karm self-assigned this Sep 19, 2024
@zakkak zakkak self-assigned this Nov 6, 2024
zakkak added a commit to zakkak/quarkus that referenced this issue Nov 6, 2024
Note: Zstd and Snappy remain unsupported.

Fixes quarkusio#43392
@zakkak
Copy link
Contributor

zakkak commented Nov 6, 2024

@fedinskiy #44348 should fix this. Please give it a try if possible.

@fedinskiy
Copy link
Contributor Author

@zakkak building this branch and running the reproducer with mvn clean verify -Dnative -Dquarkus.platform.group-id=io.quarkus -Dquarkus.platform.version=999-SNAPSHOT solved the problem

@Karm Karm changed the title Quarkus does not decrypt Brotli requests in native mode Quarkus does not decompress Brotli requests in native mode Nov 9, 2024
@quarkus-bot quarkus-bot bot added this to the 3.17 - main milestone Nov 12, 2024
@gsmet gsmet modified the milestones: 3.17 - main, 3.16.3 Nov 12, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Nov 12, 2024
Note: Zstd and Snappy remain unsupported.

Fixes quarkusio#43392

(cherry picked from commit 588d3db)
bschuhmann pushed a commit to bschuhmann/quarkus that referenced this issue Nov 16, 2024
Note: Zstd and Snappy remain unsupported.

Fixes quarkusio#43392
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants