0

There is a issue raised by one of our client who is using our Rest based API that whenever he is sending a post request to our server without AcceptEncoding http header but he is getting Compressed content in return. I checked the IIS logs on our API server which addressed his request and the request received on the server has come with a Accept-Encoding(http header) as set to gzip. In between the client machine and our server sits intermediaries(proxies) and load balancer. which network tracing tool should I use for investigating as to where this http header is getting added.

saurabh vats
  • 349
  • 3
  • 13
  • You can first get a list of the proxies crossed by the request looking at the `Via` header of your client request. Maybe there is a comment from the proxy that added the `Accept-Encoding` header. – Jeff Bencteux May 20 '16 at 14:49
  • 1
    Also, you can avoid payload transformation by adding `Cache-Control: no-transform` to the request headers (see [here](http://stackoverflow.com/questions/10369679/do-http-proxy-servers-modify-request-packets)). – Jeff Bencteux May 20 '16 at 14:54
  • @Jeff Thanks a lot for pointing me in right direction, cache-control: no-transform does work for me, please could you post your answer in the answer section so that I can accept the answer – saurabh vats May 26 '16 at 08:15

1 Answers1

1

One solution to avoid an HTTP message to be compressed is to add Cache-Control: no-transform to the request headers to avoid payload alteration by proxies as stated in RFC 7234 section 5.2.1.6.

Also, Via header may contain useful comments that can help when looking for what did each proxy add to the request.

Community
  • 1
  • 1
Jeff Bencteux
  • 1,406
  • 16
  • 27