Welcome! Log In Create A New Profile

Advanced

EmbeddedPerlImageResize bug

Jan Křepský - INVIA.CZ
April 11, 2011 09:36AM
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
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

EmbeddedPerlImageResize bug

Jan Křepský - INVIA.CZ 2445 April 11, 2011 09:36AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 73
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready