perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Theung, John " <john.the...@citi.com>
Subject [BUG] CGI param does not reset
Date Fri, 16 Jan 2009 18:34:36 GMT
Hello,
I just built a new vanilla server, Apache/2.0.63 (Unix) mod_perl/2.0.4
Perl/v5.8.0 under Solaris 10.
I noticed that the $cgi->param does not reset in the mod_perl
directories. When I run the following program, it works fine under the
standard cgi-bin, but produces what appears to be cached results under
mod_perl:

Program:
use CGI;
my $cgi=new CGI;
print $cgi->header;
print "<a href=test.pl>link 1 (no x)</a> <a href=test.pl?x=1>link 2
(with x)</a> x=".$cgi->param('x')."<br>\n";
print "REQUEST_URI:$ENV{REQUEST_URI}<br>\n";
print "QUERY_STRING:$ENV{QUERY_STRING}<br>\n";
print "CGI Version: $CGI::VERSION";

Under my mod_perl directory, if I click the "link 2" I get this:
link 1 (no x) link 2 (with x) x=1
REQUEST_URI:/gciti/test.pl?x=1
QUERY_STRING:x=1
CGI Version: 2.91

When I click "link 1," I get this:
link 1 (no x) link 2 (with x) x=1
REQUEST_URI:/gciti/test.pl
QUERY_STRING:
CGI Version: 2.91

Notice that "1" continues to show up in "x=1".

If I wait a few minutes or repeatedly click link 1, it eventually clears
up:
link 1 (no x) link 2 (with x) x=
REQUEST_URI:/gciti/test.pl
QUERY_STRING:
CGI Version: 2.91

It doesn't matter which CGI version I use. Here is my mod_perl location
configuration in httpd.conf:
<Location /myperl>
	SetHandler perl-script
	PerlResponseHandler ModPerl::Registry
	PerlOptions +ParseHeaders
	Options +ExecCGI
</Location>

I appreciate any help you can offer. My searches come up empty on this.
Thanks,
JT

Mime
View raw message