Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 51035 invoked from network); 24 Jan 2004 04:07:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Jan 2004 04:07:43 -0000 Received: (qmail 38096 invoked by uid 500); 24 Jan 2004 04:07:12 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 38082 invoked by uid 500); 24 Jan 2004 04:07:12 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 38067 invoked from network); 24 Jan 2004 04:07:11 -0000 Resent-Date: Sat, 24 Jan 2004 04:07:10 GMT Resent-Message-Id: <200401240407.i0O47AVg031701@window.geek.net.au> Date: Sat, 24 Jan 2004 15:07:22 +1100 From: Chris Drake Message-ID: <6925764281.20040124150722@pobox.com> To: modperl@perl.apache.org Subject: Re[2]: GIF contents not "coming out" Resent-from: Chris Drake MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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. Thanks also for the efficiency tip. Reading up on the meaning of "$/" I find that it's on page 666 of the perl bible - is this an omen? Sorry I didn't follow the bug procedure - the mod_perl site has altogether way too much information, and as I'm in a production environment with (as usual) unreasonable timeframes to get stuff working laden upon me, I missed that bit :-) I'm guessing that most people only want to send HTML or graphics out using mod_perl, so maybe a small extra manual section "EXAMPLES" with suggested skeleton code to accomplish this would be a great idea (especially for busy people like me)? Grr. My ADSL went down, so please excuse the missing "mybugreport" stuff. Incidentally - ModPerl 2.0 is part of RedHat ES 3.0 - but there is no "mybugreport" file anyplace on my system... 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(); SB> __________________________________________________________________ SB> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker SB> http://stason.org/ mod_perl Guide ---> http://perl.apache.org SB> mailto:stas@stason.org http://use.perl.org http://apacheweek.com SB> http://modperlbook.org http://apache.org http://ticketmaster.com -- 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