Hello There. If you want to eliminate the need of the 'print ""' line, you should reverse the order of the commands: local $| = 1; print "Content-type: image/gif\r\n\r\n"; (That's because the $| is a flashing command. NM) And you don't need to "\r\n\r\n". "\n\n" will do the job.
Semuel. -----Original Message----- From: Chris Drake [mailto:[EMAIL PROTECTED] Sent: Saturday, January 24, 2004 6:07 AM To: [EMAIL PROTECTED] Subject: Re[2]: GIF contents not "coming out" Hi Stas, Thanks for the pointers. I've spent another hour on the problem, and found that this fixes it:- print "Content-type: image/gif\r\n\r\n"; local $| = 1; print ""; (interestingly, omitting the empty print causes the problem to come back); This only happens with GIF data incidentally - sending text worked fine before now. Kind Regards, Chris Drake Saturday, January 24, 2004, 1:25:43 PM, you wrote: SB> Chris Drake wrote: >> 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!!! SB> Please read on how we like problems to be reported: http://perl.apache.org/bugs/ SB> Make sure to include the relevant config section (is it 'perl-script' or SB> 'modperl' SetHandler?) SB> Also any difference if you remove 'use bytes'? SB> Also this is much more efficient way to read/print a multiline file: SB> local $/; SB> $::r->print(<GIF>); -- 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