-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
Spring Boot Version
Tested with 2.0.1.RELEASE
and the latest commit on master c43eb89.
Issue
When using Spring WebFlux with Netty and Gzip compression is enabled, the HTTP response correctly contains the content-encoding: gzip
header, but the actual response body isn't compressed. This will cause Chrome to fail with ERR_CONTENT_DECODING_FAILED
. Switching to a different sever, such as Undertow or Tomcat, will yield the correct result. Response bodies returned from a router function that are large enough to trigger compression seem to work fine, it only appears to happen for static resources.
Reproduction Steps
Using the spring-boot-sample-webflux
project, create a public
directory in src/main/resources/
and place this text file in there. Run the project with mvn spring-boot:run -Dserver.compression.enabled=true
and navigate to http://localhost:8080/test.txt.