EmbeddedPerlImageResize bug
Jan Křepský - INVIA.CZ
jan.krepsky at invia.cz
Mon Apr 11 17:34:48 MSD 2011
Hi,
I discovered a bug in EmbeddedPerlImageResize module code at the website http://wiki.nginx.org/EmbeddedPerlImageResize.
If I send an image file to user only by statement
$r->sendfile($dest_file);
and look to incoming HTTP header, there are Unknown Content-Type and Content-Length fields. So browser (or wget) download this file immediatelly, but
then wait for about 12-14 seconds.. If I set request Content-Type and Content-Length fields, it works okay.
Example:
my $filesize = -s $ dest_file;
$request->header_out("Content-Length", $filesize);
$request->send_http_header("image/jpeg");
$request->sendfile($dest_file);
$request->rflush;
Sir.Jackal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-devel/attachments/20110411/38d53f8c/attachment.html>
More information about the nginx-devel
mailing list