perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Drake <christop...@pobox.com>
Subject Re[2]: GIF contents not "coming out"
Date Sat, 24 Jan 2004 04:07:22 GMT
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(<GIF>);

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


Mime
View raw message