git.shiar.nl
/
perl
/
plp
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
v3.01 release
[perl/plp/.git]
/
plp.cgi
diff --git
a/plp.cgi
b/plp.cgi
index 6dbcee9f01abdd30336a0738f27d2e86b5d91c6b..85d82100b55441ddd7ff00fd5437413f1fc79172 100755
(executable)
--- a/
plp.cgi
+++ b/
plp.cgi
@@
-2,7
+2,7
@@
use v5.6.0;
use PLP;
use v5.6.0;
use PLP;
-die 'Wrong module version' if $PLP::VERSION ne '3.0
0
';
+die 'Wrong module version' if $PLP::VERSION ne '3.0
1
';
use vars qw($DEBUG);
use vars qw($DEBUG);
@@
-23,15
+23,14
@@
our $mod_perl = exists $ENV{MOD_PERL};
my $path_info;
while (not -f $file) {
if (not $file =~ s/(\/+[^\/]*)$//) {
my $path_info;
while (not -f $file) {
if (not $file =~ s/(\/+[^\/]*)$//) {
- $ENV{REDIRECT_STATUS} = '404';
- print STDERR "PLP: Not found: $file\n";
+ print STDERR "PLP: Not found: $ENV{PATH_TRANSLATED} ($ENV{REQUEST_URI})\n";
if ($mod_perl) {
Apache->request->uri($ENV{REQUEST_URI});
print STDOUT "Status: 404 Not Found";
Apache::exit();
} else {
if ($mod_perl) {
Apache->request->uri($ENV{REQUEST_URI});
print STDOUT "Status: 404 Not Found";
Apache::exit();
} else {
-
print STDOUT "Status: 404 Not Found\n\nNot found: $ENV{REQUEST_URI}"
;
+
PLP::error(undef, 404)
;
exit;
}
}
exit;
}
}
@@
-45,11
+44,12
@@
our $mod_perl = exists $ENV{MOD_PERL};
}
if (not -r $file) {
}
if (not -r $file) {
+ print STDERR "PLP: Can't read: $ENV{PATH_TRANSLATED} ($ENV{REQUEST_URI})\n";
if (exists $ENV{MOD_PERL}) {
print STDOUT "Status: 403 Forbidden";
Apache::exit();
} else {
if (exists $ENV{MOD_PERL}) {
print STDOUT "Status: 403 Forbidden";
Apache::exit();
} else {
-
print STDOUT "Status: 403 Forbidden\n\nForbidden: $ENV{REQUEST_URI}"
;
+
PLP::error(undef, 403)
;
exit;
}
}
exit;
}
}
@@
-79,13
+79,9
@@
our $mod_perl = exists $ENV{MOD_PERL};
PLP::Functions->import();
eval qq{package PLP::Script; $PLP::code};
}
PLP::Functions->import();
eval qq{package PLP::Script; $PLP::code};
}
+ PLP::error($@, 1) if $@;
select STDOUT;
undef *{"PLP::Script::$_"} for keys %PLP::Script::;
PLP::SendHeaders() unless $PLP::sentheaders;
select STDOUT;
undef *{"PLP::Script::$_"} for keys %PLP::Script::;
PLP::SendHeaders() unless $PLP::sentheaders;
- if ($@ && $DEBUG & 1){
- print $header{'Content-Type'} =~ m!^text/html!i
- ? ("<hr><b>Debug</b><br>", Entity($@))
- : ("[Debug]\n", $@);
- }
}
}