-
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 Gzip max input with suffix format not working #39636
Comments
What configuration value did you use to cause the error message? Asking because I was not able to reproduce the problem. |
The problem happens whenever you configure the max-input property with a data storage unit suffix. You can find the reproducer attached to the issue. |
I tried the attached sample and could not reproduce the problem, which is why I asked :) |
Thanks for your return. |
Thanks. I'm not at a computer now, I'll try it next week. |
The tests pass in the uploaded reproducer. |
@geoand the trick is that AFAICS the test is testing that the behavior is incorrect. I think I have a fix, will push it soon. |
Some part of RESTEasy are using ResteasyConfigurationMPConfig to map the config and we were incorrectly pushing the raw string for quarkus.resteasy.gzip.max-input. Fixes quarkusio#39636
#39828 should fix it. Thanks for raising the issue as it was indeed concerning. |
Some part of RESTEasy are using ResteasyConfigurationMPConfig to map the config and we were incorrectly pushing the raw string for quarkus.resteasy.gzip.max-input. Fixes quarkusio#39636 (cherry picked from commit bd4d294)
Some part of RESTEasy are using ResteasyConfigurationMPConfig to map the config and we were incorrectly pushing the raw string for quarkus.resteasy.gzip.max-input. Fixes quarkusio#39636 (cherry picked from commit bd4d294)
Some part of RESTEasy are using ResteasyConfigurationMPConfig to map the config and we were incorrectly pushing the raw string for quarkus.resteasy.gzip.max-input. Fixes quarkusio#39636 (cherry picked from commit bd4d294)
Some part of RESTEasy are using ResteasyConfigurationMPConfig to map the config and we were incorrectly pushing the raw string for quarkus.resteasy.gzip.max-input. Fixes quarkusio#39636
Some part of RESTEasy are using ResteasyConfigurationMPConfig to map the config and we were incorrectly pushing the raw string for quarkus.resteasy.gzip.max-input. Fixes quarkusio#39636 (cherry picked from commit bd4d294)
Describe the bug
The documentation mentions that the
quarkus.resteasy.gzip.max-input
can be configured by providing a suffix format such as100M
.quarkus/docs/src/main/asciidoc/resteasy.adoc
Lines 725 to 726 in 26dd881
If the property is configured using the allowed suffix (check regex above), Resteasy considers it as an invalid format and falls back to the default value of 10mb.
A log message can also be identified in the log output.
The properties used in quarkus tests do not use such suffix, considering only the bytes format.
quarkus/integration-tests/main/src/main/resources/application.properties
Line 32 in 26dd881
quarkus/extensions/resteasy-classic/resteasy-client/deployment/src/test/resources/client-using-gzip-application.properties
Line 2 in 26dd881
In addition, Resteasy
GZIPDecodingInterceptor
only accepts a value up to 2147483647 (Integer.MAX_VALUE), which I think would worth mentioning in the documentation.https://github.com/resteasy/resteasy/blob/6.2.7.Final/resteasy-core/src/main/java/org/jboss/resteasy/plugins/interceptors/GZIPDecodingInterceptor.java
Expected behavior
Quarkus should be able to properly convert the size if a data storage unit is provided as a suffix
OR
Consider only bytes format
Actual behavior
Quarkus is not able to convert the data storage unit falling back to the default value of 10mb
How to Reproduce?
quarks-gzip-reproducer.zip
Output of
uname -a
orver
No response
Output of
java -version
openjdk 17.0.9 2023-10-17 OpenJDK Runtime Environment Temurin-17.0.9+9 (build 17.0.9+9) OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (build 17.0.9+9, mixed mode)
Quarkus version or git rev
3.8.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: