Hi All, My mod_perl 2 script is not sending back the contents of the GIF I'm trying to print. Running it locally, it does, or if I go:- print "foo"; ... I get "foo" - but when I print the GIF - I just get back the headers without any content!!!
HELP! -------------------------------------------------------------- #!/usr/bin/perl use Chris; use bytes; { $::r=shift; use strict; print "Content-type: image/gif\n"; print "\n"; my($icon)='favicon_2.ico'; if(open(GIF,"<$::WebPath/$icon")) { my @gif=<GIF>; $::r->print( @gif ); #warn @gif; close(GIF); } else { warn "Could not open $::WebPath/$icon - $!"; } $::r->print("foo\n"); # Nothing comes back } -------------------------------------------------------------- [cnd]$ curl -i http://www.example.com/foo.asp HTTP/1.1 200 OK Date: Sat, 24 Jan 2004 01:57:18 GMT Server: Apache Transfer-Encoding: chunked Content-Type: image/gif [cnd]$ -------------------------------------------------------------- ==> /var/log/httpd/access_log <== 2004-01-24 01:57:18 200 "GET /foo.asp HTTP/1.1" "curl/7.10.1 (i686-pc-linux-gnu) libcurl 7.9.8 (OpenSSL 0.9.6) (ipv6 enabled)" -image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* - 4919 -------------------------------------------------------------- If I comment out the line "$::r->print( @gif );", I get this though!:- [cnd]$ curl -i http://www.example.com/foo.asp HTTP/1.1 200 OK Date: Sat, 24 Jan 2004 01:59:55 GMT Server: Apache Transfer-Encoding: chunked Content-Type: image/gif foo [cnd]$ -------------------------------------------------------------- What's UP? Is this a bug or something?? I'm using RedHet Enterprise 3 Apache/2.0.46 (Red Hat) /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/ModPerl/Registry.pm /usr/share/doc/mod_perl-1.99_09/docs/api/ModPerl -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html