3

I have a spring boot API and i have enabled the HTTP response compression by using the below properties.

server:
  compression:
    enabled: true
    mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json
    min-response-size: 1024

I tested the API locally on postman after and before the property change, and its not reducing the response size after the compression, my response has size of 280 KB. But i could see that the response header contains Content-Encoding as gzip and Transfer-Encoding is chunked.

So any idea on why the response size is not getting reduced?

Ansar Samad
  • 572
  • 2
  • 11
  • 34
  • I am also having similar issue,I tried with xml ,jpeg, its not reducing the size even though the response header shows encoding as gzip – Neeush Sreenivas Sep 04 '21 at 07:40

1 Answers1

0

To test locally the zipped size in Postman remove the Content-Encoding = gzip property from the response header. By removing this specification Postman is no longer able to perform decompression and will show the true size.