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"><<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>></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>
> Dear list,<br>
><br>
> i'm having an issue with cached fastcgi responses with content<br>
> length 0:<br>
><br>
> #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>
> curl: (18) transfer closed with outstanding read data remaining<br>
><br>
> #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>
> HTTP/1.1 302 Moved Temporarily<br>
> Server: nginx/0.8.49<br>
> Date: Thu, 26 Aug 2010 12:27:23 GMT<br>
> Content-Type: audio/aacp<br>
> Connection: close<br>
> Location:<br>
> <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>
> X-CACHE: HIT<br>
><br>
><br>
> I understand the Content-Length Header is missing and therefor<br>
> chunked transfer encoding breaks.<br>
><br>
><br>
> This only happens with cached responses and only with<br>
> fastcgi_cache.<br>
><br>
> Everything works fine, if i either disable fastcgi_cache or if i<br>
> wrap another nginx around my nginx+php-fpm setup with<br>
> proxy_cache.<br>
><br>
> i've done quite a bit of research but didn't find any other<br>
> solution than setting chunked_transfer_encoding to off, which<br>
> effects every request.<br>
><br>
> i'm using nginx/0.8.49 with php-fpm 5.3.3 on gentoo<br>
><br>
><br>
> 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>