This is the key change. When using the GzipFilter, this will call the overridden method GZipResponse.setContentLength(int contentLength) which will ignore the contentLength.