You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stefan Thuering <st...@freesurf.ch> on 2002/08/20 18:57:22 UTC

apache1.3(win32) - mod_perl 1.27 - activestate - path_info error

Hi, I'm new here so tell me if I'm doing something wrong :)

I posted a report to 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10820 but they said it 
seems to be a mod_perl bug.

here goes:
-------------
If you run the following perl code (on Apache 1.3.2x (win32) - mod_perl
1.27_01-dev - activstate perl build 631/633):
- once with bla/test.pl/xxxxxxxxxx
- and then bla/test.pl
...the first foreach will have _NO_ PATH_INFO entry
...the hardcoded $ENV{'PATH_INFO'} will have it!!!
...and also the second foreach will have it!!!

The Path_info seems to be cached serverwide. Every time I use a
$ENV{'PATH_INFO'} it has contents even though it shouldn't. The 
path_info isn't initialized correctly on win32 (linux apache/mod_perl 
doesn't show this behavior).

#!/perl/bin/perl
use strict;
print "content-type: text/html\n\n";
print '<html><body>';
my $val;
foreach my $var (sort(keys(%ENV))) {
     $val = $ENV{$var};
     $val =~ s|\n|\\n|g;
     $val =~ s|"|\\"|g;
     print "${var}=\"${val}\"<br>";
}
print '<br>',$ENV{'PATH_INFO'},'<br><br>';
foreach my $var (sort(keys(%ENV))) {
     $val = $ENV{$var};
     $val =~ s|\n|\\n|g;
     $val =~ s|"|\\"|g;
     print "${var}=\"${val}\"<br>";
}
print '</body></html>';
------------

what do you think?

cu
Stefan

-- 
homepage http://my.animeweb.org