Hi all,
There is a bug in PerlRun.pm that causes internal server error
if PerlRun handler is called for inexistent file. I think that
problem was introduced by this change
=item 1.24_01 - October 10, 2000
.....
change Apache::PerlRun's Apache class relationship from is-a to has-a
There are a couple of places left where $pr->{r}->_some_method_() should be
called instead of $pr->_some_method_(). One of them is already noted -- call
to uri() in sub error_check.
Here is the patch:
-------------------------------------------
--- old/PerlRun.pm Thu Sep 28 23:59:36 2000
+++ new/PerlRun.pm Thu Jan 04 16:10:27 2001
@@ -50,7 +50,7 @@
$pr->{'mtime'} = -M _;
return wantarray ? (OK, $pr->{'mtime'}) : OK;
}
- $pr->log_error("$filename not found or unable to stat");
+ $r->log_error("$filename not found or unable to stat");
return NOT_FOUND;
}
@@ -209,7 +209,7 @@
my $pr = shift;
if ($@ and substr($@,0,4) ne " at ") {
$pr->{r}->log_error("PerlRun: `$@'");
- $@{$pr->uri} = $@;
+ $@{$pr->{r}->uri} = $@;
$@ = ''; #XXX fix me, if we don't do this Apache::exit() breaks
return SERVER_ERROR;
}
-------------------------------------------
-- Alexander