fixed: User is logged out if a fatal error occurs
error reporting and debug cleanups
This commit is contained in:
parent
e37db64483
commit
315e47781e
4 changed files with 40 additions and 34 deletions
|
|
@ -66,15 +66,14 @@ sub handler {
|
|||
my $error = "";
|
||||
my $matchUri = $request->uri;
|
||||
my $gateway = $config->get("gateway");
|
||||
$matchUri =~ s{^$gateway(.*)}{/$1};
|
||||
$matchUri =~ s{^$gateway}{/};
|
||||
my $gotMatch = 0;
|
||||
foreach my $handler (@{$config->get("urlHandlers")}) {
|
||||
WEBGUI_FATAL: foreach my $handler (@{$config->get("urlHandlers")}) {
|
||||
my ($regex) = keys %{$handler};
|
||||
if ($matchUri =~ m{$regex}i) {
|
||||
my $output = eval { WebGUI::Pluggable::run($handler->{$regex}, "handler", [$request, $server, $config]) };
|
||||
if ($@) {
|
||||
$error = $@;
|
||||
warn $@ if ($@ =~ "^fatal:");
|
||||
last;
|
||||
}
|
||||
else {
|
||||
|
|
@ -82,7 +81,7 @@ sub handler {
|
|||
if ($output ne Apache2::Const::DECLINED) {
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Apache2::Const::DECLINED if ($gotMatch);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue