title: nginx return corrupted data from memcached
body: <p>On my web site i've made data caching with memcached. It stores fully generated html pages. Next step was to get this data from memcached by nginx and send back to user w\o starting apache process.
  First i tried to get data from cache by php backend and it worked. But when i try make this with nginx - i see hardly corrupted data. smth like <img src="https://i.stack.imgur.com/JFGW0.png" alt="enter image description here"></p>
  
  <p>i'm asking for help with this problem.</p>
  
  <p>p.s. here the part of nginx config if it can help</p>
  
  <pre><code>location / {
      #add_header    Content-Type  "text/html";
      set $cachable 1;
  
      if ($request_method = POST){
          set $cachable 0;
          break;
      }
      if ($http_cookie ~ "beauty_logged") {
          set $cachable 0;
          break;
      }
  
      if ($cachable = 1) {
          set             $memcached_key   'nginx_$host$uri';
          memcached_pass  127.0.0.1:11211;
      }
  
      default_type    text/html;
      error_page      404 502 504 405 = @php;
      #proxy_pass http://front_cluster;
  }
  
  location @php {
      proxy_pass http://front_cluster;
  }
  </code></pre>