Content Truncating

Michael Shadle mike503 at gmail.com
Wed Apr 8 01:16:57 MSD 2009


I would look at leveraging x-accel-redirect instead. why have php keep
spoonfeeding the file when you can offload it to the webserver? :)

On Tue, Apr 7, 2009 at 12:54 PM, michael <nginx-forum at nginx.us> wrote:
> Hi,
>
> I am having a weird issue where nginx is truncating a few bytes of content from the end of files. The files are being served from PHP (FastCGI via php-fpm) using PHP's readfile(). The PHP application sends out a Content-Length header using filesize() and then spits out the contents of the file to nginx using readfile().
>
> The content however is coming short by a few bytes. nginx sends the correct Content-Length, but closes the connection a few bytes short of the Content-Length number of bytes. This doesn't happen for all files and I can't seem to find a pattern either.
>
> Any ideas?
>
> Thanks,
> -Michael
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,891,891#msg-891
>
>
>





More information about the nginx mailing list