Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com May 13 '11 at 3:26

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.