Hello maybe this php replicement helps to.<div><a href="http://gist.github.com/505962">http://gist.github.com/505962</a></div><div><a href="http://gist.github.com/505962"></a>or add your nginx.conf</div><div>fastcgi_param CONTENT-LENGTH $content_length;</div>

<div><br></div><div><br clear="all">--<br>Hüseyin Mert<br><a href="http://www.hmert.com">http://www.hmert.com</a><br>
<br><br><div class="gmail_quote">On Thu, Aug 26, 2010 at 7:31 PM, Maxim Dounin <span dir="ltr">&lt;<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div id=":136">Hello!<br>
<div><div></div><div class="h5"><br>
On Thu, Aug 26, 2010 at 06:13:47PM +0200, Thomas Lohner wrote:<br>
<br>
&gt; Dear list,<br>
&gt;<br>
&gt; i&#39;m having an issue with cached fastcgi responses with content<br>
&gt; length 0:<br>
&gt;<br>
&gt; #curl <a href="http://127.0.0.1/lq/aac/iPhone/a3efe0a282dafd" target="_blank">http://127.0.0.1/lq/aac/iPhone/a3efe0a282dafd</a><br>
&gt; curl: (18) transfer closed with outstanding read data remaining<br>
&gt;<br>
&gt; #curl -I <a href="http://127.0.0.1/lq/aac/iPhone/a3efe0a282dafd" target="_blank">http://127.0.0.1/lq/aac/iPhone/a3efe0a282dafd</a><br>
&gt; HTTP/1.1 302 Moved Temporarily<br>
&gt; Server: nginx/0.8.49<br>
&gt; Date: Thu, 26 Aug 2010 12:27:23 GMT<br>
&gt; Content-Type: audio/aacp<br>
&gt; Connection: close<br>
&gt; Location:<br>
&gt; <a href="http://xxxxx/stream_basis_aac_lq#4p765no3|0|0|vCubar|nnp|yd" target="_blank">http://xxxxx/stream_basis_aac_lq#4p765no3|0|0|vCubar|nnp|yd</a><br>
&gt; X-CACHE: HIT<br>
&gt;<br>
&gt;<br>
&gt; I understand the Content-Length Header is missing and therefor<br>
&gt; chunked transfer encoding breaks.<br>
&gt;<br>
&gt;<br>
&gt; This only happens with cached responses and only with<br>
&gt; fastcgi_cache.<br>
&gt;<br>
&gt; Everything works fine, if i either disable fastcgi_cache or if i<br>
&gt; wrap another nginx around my nginx+php-fpm setup with<br>
&gt; proxy_cache.<br>
&gt;<br>
&gt; i&#39;ve done quite a bit of research but didn&#39;t find any other<br>
&gt; solution than setting chunked_transfer_encoding to off, which<br>
&gt; effects every request.<br>
&gt;<br>
&gt; i&#39;m using nginx/0.8.49 with php-fpm 5.3.3 on gentoo<br>
&gt;<br>
&gt;<br>
&gt; Is there any other way to fix this? Any thoughts are appreciated.<br>
<br>
</div></div>These patches should resolve your issue:</div></blockquote></div><br></div>