print "Expires: Fri, 30 Oct 1998 14:19:41 GMT\n";
Hrm, you're sending an Expires date of about five years ago. Just how that will be handled is probably browser-specific, but I suspect this is your problem. Don't hardcode the expire data. Instead, use Date::Manip (or a similar module) to add a certain ammount of time to the current data.
Also, you're creating more work for yourself and using memory unnecessarily. Instead of buffering the image, print it out as you get it:
open IMAGE, "e:/image1.png"; my $buff; while(read IMAGE, $buff, 1024) { print $buff; } close IMAGE;
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
:(){ :|:&};:
Note: All code is untested, unless otherwise stated
In reply to Re: return image from CGI scrript error
by hardburn
in thread return image from CGI scrript error
by bear0053
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |