gzip encoded responses doesn't decode <p>I use gzip encoding in php:</p> <pre><code>ob_start("ob_gzhandler"); echo json_encode($arr); ob_end_flush(); </code></pre> <p>It works locally on my OpenServer, but uploaded to production it doesn't get decoded by browser. </p> <p>I get</p> <pre><code>‹мќ]s›8Зї ГЕs±"... </code></pre> <p>instead of json object. Where can be an issue? </p> <p>Prod headers:</p> <pre><code>Server: nginx/1.2.6 Date: Tue, 08 Sep 2015 11:30:56 GMT Content-Type: text/html; charset=WINDOWS-1251 Content-Length: 3661 Connection: keep-alive X-Powered-By: PHP/5.2.17 Content-Encoding: gzip Vary: Accept-Encoding </code></pre> <p>Local headers:</p> <pre><code>Connection:Keep-Alive Content-Encoding:gzip Content-Length:4066 Content-Type:text/html Date:Tue, 08 Sep 2015 11:30:57 GMT Keep-Alive:timeout=10, max=100 Server:Apache/2.2.27 (Win32) Vary:Accept-Encoding </code></pre>