Just out of curiosity, wouldn't it be better to test with exists()?I did a quick test using env.pl, which confirms that for me as well, the PATH_INFO variable exists only if there actually is something in the url.
That is: http://foo/bar.pl -> no PATH_INFO exists in %ENV http://foo/bar.pl/ -> PATH_INFO = /This holds both under mod_perl (with ModPerl::Registry) and under mod_cgi. My Apache is 2.0.52.
As an aside, I have distant memories of IIS/5.0 not being able to do path_info at all, at least not without certain arcane rituals too gross to detail here.
Rhesa
#!/usr/bin/perl
# env.pl
print "Content-type: text/plain\n\n";
print map { "$_\t=$ENV{$_}\n" } sort keys %ENV;
# end
Ron Savage wrote:
Hi Michael(3) Line 168: unless(defined $ENV{PATH_INFO}) { croak "reality checked failed: PATH_INFO is not defined in the environment"; }I wrote a tiny CGI script containing: my($env_path_info) = defined($ENV{'PATH_INFO'}) ? "Defined: $ENV{'PATH_INFO'}" : "Not defined"; and that displays Not Defined. Again, this is Apache V 2. So it seems your assumption that path_info is always defined, is wrong, at least in the case of non-mod_perl handlers.
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.