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

response body error when use brotli as compression encode #34719

Closed
naah69 opened this issue Jul 13, 2023 · 9 comments · Fixed by #35700
Closed

response body error when use brotli as compression encode #34719

naah69 opened this issue Jul 13, 2023 · 9 comments · Fixed by #35700
Labels
area/vertx kind/bug Something isn't working triage/upstream Used for issues which are caused by issues in upstream projects/dependency
Milestone

Comments

@naah69
Copy link

naah69 commented Jul 13, 2023

Describe the bug

When I use brotli to compress response body,the response body can't be decompressed.

I create CompresssionHttpServerCustomizer to enable brotli,the way is from vertx_http_compression_algorithms

    @Override
    public void customizeHttpServer(HttpServerOptions options) {
        options.addCompressor(getBrotliOptions(compressionLevel));
        options.addCompressor(getGzipOptions(compressionLevel));
    }

Expected behavior

brotli compression work!

Actual behavior

response body can't be decompred,it failed!

How to Reproduce?

quarkus-br.zip

Output of uname -a or ver

mac-arm and x86

Output of java -version

17.0.5

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.13.4.Final

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

3.8.4

Additional information

No response

@naah69 naah69 added the kind/bug Something isn't working label Jul 13, 2023
@naah69 naah69 changed the title response body error when use brotli as compression encod response body error when use brotli as compression encode Jul 13, 2023
@geoand
Copy link
Contributor

geoand commented Jul 13, 2023

Have you tried with Quarkus 3.2.0.Final?

@geoand geoand added the triage/needs-feedback We are waiting for feedback. label Jul 13, 2023
@naah69
Copy link
Author

naah69 commented Jul 13, 2023

Have you tried with Quarkus 3.2.0.Final?
@geoand
yes,3.2.0.Final had the same problem.
quarkus3-br.zip

@naah69
Copy link
Author

naah69 commented Jul 17, 2023

Have you tried with Quarkus 3.2.0.Final?

@geoand
Is there any progress?

@geoand
Copy link
Contributor

geoand commented Jul 17, 2023

Nope, I have a very long list of things to do

@geoand geoand removed the triage/needs-feedback We are waiting for feedback. label Jul 17, 2023
@geoand
Copy link
Contributor

geoand commented Jul 17, 2023

maybe @cescoffier knows immediately what the problem is

@cescoffier
Copy link
Member

In native mode we disable Brotli (on purpose). However in JVM mode it should work.

@naah69
Copy link
Author

naah69 commented Jul 17, 2023

In native mode we disable Brotli (on purpose). However in JVM mode it should work.在本机模式下,我们(故意)禁用 Brotli。但是在 JVM 模式下它应该可以工作。

@cescoffier

we use JVM mode,but it didn't work.

the below is my code.Can u help me to check the code is right?

quarkus2-br.zip

quarkus3-br.zip

@cescoffier
Copy link
Member

Our Brotli support only works up to 8192 (1024*8) bytes. For responses bigger than this, it corrupts the output.
It does not seem to happen when using Vert.x directly. So, it might be something we do somewhere.

CC @vietj @franz1981

@cescoffier
Copy link
Member

I believe it's related to eclipse-vertx/vert.x#4567.

@geoand geoand added the triage/upstream Used for issues which are caused by issues in upstream projects/dependency label Jul 21, 2023
cescoffier added a commit to cescoffier/quarkus that referenced this issue Sep 4, 2023
Also bump Quarkus HTTP to 5.0.3.Final to handle a breaking change in the Vert.x API.

Fix quarkusio#35180
Fix quarkusio#34719
cescoffier added a commit to cescoffier/quarkus that referenced this issue Sep 4, 2023
Also bump Quarkus HTTP to 5.0.3.Final to handle a breaking change in the Vert.x API.

Fix quarkusio#35180
Fix quarkusio#34719
Fix quarkusio#35278
@quarkus-bot quarkus-bot bot added this to the 3.4 - main milestone Sep 5, 2023
aloubyansky pushed a commit to aloubyansky/quarkus that referenced this issue Nov 1, 2023
Also bump Quarkus HTTP to 5.0.3.Final to handle a breaking change in the Vert.x API.

Fix quarkusio#35180
Fix quarkusio#34719
Fix quarkusio#35278
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Feb 8, 2024
Also bump Quarkus HTTP to 5.0.3.Final to handle a breaking change in the Vert.x API.

Fix quarkusio#35180
Fix quarkusio#34719
Fix quarkusio#35278
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertx kind/bug Something isn't working triage/upstream Used for issues which are caused by issues in upstream projects/dependency
Projects
None yet
3 participants