I have quarkus.http.enable-compression=true
in my src/main/resources/application.properties
file, and with Quarkus 2.8.3.Final it works as expected. i.e. HTTP requests with an Accept-Encoding: gzip
header receive a gzip'd response body.
But when I update to Quarkus 2.9.0.Final (or later) quarkus.http.enable-compression=true
seems to be ignored, and HTTP response bodies are no longer gzip'd.
I see from the Migration Guide 2.9 that "HTTP compression settings have been made build time configuration so they cannot be overridden at runtime anymore." But my understanding is that application.properties can hold both build time and runtime configuration.
I also tried taking the setting out of application.properties and instead:
quarkus:dev -Dquarkus.http.enable-compression=true
That works on 2.8.3.Final, but not on 2.9.0.Final.
What am I missing?
yes, the migration guide is incomplete. Previously, all HTTP responses were compressed if the config property quarkus.http.enable-compression
was set to true
. Since 2.9 the response body is compressed if quarkus.http.enable-compression=true
AND:
@io.quarkus.vertx.http.Compressed
, orContent-Type
header is set and the value is a compressed media type as configured via quarkus.http.compress-media-types
.See also:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With