0

We enabled gzip and deflate in our local server and it shows correctly in phpinfo like shown below HTTP_ACCEPT_ENCODING gzip,deflate,sdch

We installed the same in our client's server and there was not such entry in phpinfo in the client's server. After some research, we found that our proxy server is blocking this entry in phpinfo. Our company uses a transparent proxy (as most companies would) to control internet traffic. If this proxy is on, HTTP_ACCEPT_ENCODING settings is missing from phpinfo. When we disable our proxy, the same entry is showing in phpinfo in the client server. It seems a bit strange

Can anyone tell us a solution where we can get the same settings even with a proxy turned on?

Thanks in Advance, RT

1 Answers1

1

It sounds like the proxy is stripping the "Accept-Encoding" header from the HTTP request because it cannot, or does not want to, deal with gzip encoded content.

If you have no access to reconfigure the proxy, there is nothing you can do about this. You would need to be able to configure the proxy to allow gzip encoded content or to not touch the Accept-Encoding header.

When phpinfo() reports the value of $_SERVER['HTTP_ACCEPT_ENCODING'], all it's doing is telling you want the value of the HTTP "Accept-Encoding" header was that it received from the client (or proxy). The proxy is not technically modifying the output of phpinfo(), it's just affecting the request.

thomasrutter
  • 2,527
  • 1
  • 25
  • 34