rhumbliner has asked for the wisdom of the Perl Monks concerning the following question:
thank you for taking my call ...
i'm using CGI::Simple for a web app running under mod_perl and i've noticed a strange behavior. the following code runs as expected outside of mod_perl:
use CGI::Simple; my $q = new CGI::Simple; my $qh = $q->Vars; ... print $q->header(-charset=>'utf8', -expires=>'+10m'); warn $q->header(-charset=>'utf8', -expires=>'+10m');
where i see the proper header at the client and in apache's error log
but running under mod_perl this code places an empty string in the error log and repeats the expiration date in the header presented to the client! furthermore, if i simply call $q->header() without the print, the header is set properly. i never have to even print the header!
$q->header(-charset=>'utf8', -expires=>'+10m');
i assume this issue has something to do with PerlSendHeader. i've read thru the documentation for porting cgi applications to mod_perl and i'm fairly sure my code is clean. can someone explain to me what's happening here?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CGI::Simple and mod_perl
by Anonymous Monk on Nov 03, 2011 at 03:35 UTC | |
by rhumbliner (Sexton) on Nov 03, 2011 at 23:38 UTC | |
by Anonymous Monk on Nov 04, 2011 at 06:27 UTC | |
by rhumbliner (Sexton) on Nov 09, 2011 at 14:59 UTC | |
Re: CGI::Simple and mod_perl
by Anonymous Monk on Nov 03, 2011 at 02:05 UTC | |
by rhumbliner (Sexton) on Nov 03, 2011 at 02:54 UTC |