-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
2.3.10.Final
-
None
After upgrading to SpringBoot 3.2.x and SpringFramework 6.1.x the solution described here to automatically decompress HTTP requests no longer worked as expected.
The final data when converted to String was truncated to the original length of the compressed data.
Details can be found in SF issue 30621
The reason is that newer StringHttpMessageConverter implementation relies on {{ContentLength }}that is still reported with the original value even after {{RequestEncodingHandler }}has decompressed the data (so Content Length should be updated accordingly).
I have posted a workaround as a SO answer that basically removes the "Content-Length" header from the HTTP request once data gets uncompressed. A better solution may be implemented.