fix: Pluggable URL handlers didn't work with gateways other than /.
This commit is contained in:
parent
bff94329dc
commit
215914590a
3 changed files with 8 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
7.5.1
|
7.5.1
|
||||||
- rfe: maintenance - turn on/off maintenance mode from the command line
|
- rfe: maintenance - turn on/off maintenance mode from the command line
|
||||||
- Slight performance increase in asset queries.
|
- Slight performance increase in asset queries.
|
||||||
|
- fix: Pluggable URL handlers didn't work with gateways other than /.
|
||||||
- fix: RSS missing in message (perlDreamer Consulting, LLC.)
|
- fix: RSS missing in message (perlDreamer Consulting, LLC.)
|
||||||
http://www.plainblack.com/bugs/tracker/rss-missing-in-message
|
http://www.plainblack.com/bugs/tracker/rss-missing-in-message
|
||||||
- fix: Friends language error (perlDreamer Consulting, LLC.)
|
- fix: Friends language error (perlDreamer Consulting, LLC.)
|
||||||
|
|
|
||||||
|
|
@ -458,7 +458,7 @@
|
||||||
# { "^/perl-status$" : "WebGUI::URL::PassThru" },
|
# { "^/perl-status$" : "WebGUI::URL::PassThru" },
|
||||||
{ "^/uploads/dictionaries" : "WebGUI::URL::Unauthorized" },
|
{ "^/uploads/dictionaries" : "WebGUI::URL::Unauthorized" },
|
||||||
{ "^/uploads" : "WebGUI::URL::Uploads" },
|
{ "^/uploads" : "WebGUI::URL::Uploads" },
|
||||||
{ "^/\*give-credit-where-credit-is-due\*$" : "WebGUI::URL::Credits" },
|
{ "^/\\*give-credit-where-credit-is-due\\*$" : "WebGUI::URL::Credits" },
|
||||||
{ "^/abcdefghijklmnopqrstuvwxyz$" : "WebGUI::URL::Snoop" },
|
{ "^/abcdefghijklmnopqrstuvwxyz$" : "WebGUI::URL::Snoop" },
|
||||||
{ ".*" : "WebGUI::URL::Content" }
|
{ ".*" : "WebGUI::URL::Content" }
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,14 @@ sub handler {
|
||||||
my $server = Apache2::ServerUtil->server; #instantiate the server api
|
my $server = Apache2::ServerUtil->server; #instantiate the server api
|
||||||
my $config = WebGUI::Config->new($server->dir_config('WebguiRoot'), $configFile); #instantiate the config object
|
my $config = WebGUI::Config->new($server->dir_config('WebguiRoot'), $configFile); #instantiate the config object
|
||||||
my $error = "";
|
my $error = "";
|
||||||
|
my $matchUri = $request->uri;
|
||||||
|
my $gateway = $config->get("gateway");
|
||||||
|
warn $matchUri;
|
||||||
|
$matchUri =~ s{^$gateway(.*)}{/$1};
|
||||||
|
warn $matchUri;
|
||||||
foreach my $handler (@{$config->get("urlHandlers")}) {
|
foreach my $handler (@{$config->get("urlHandlers")}) {
|
||||||
my ($regex) = keys %{$handler};
|
my ($regex) = keys %{$handler};
|
||||||
if ($request->uri =~ m{$regex}i) {
|
if ($matchUri =~ m{$regex}i) {
|
||||||
my $output = eval { WebGUI::Pluggable::run($handler->{$regex}, "handler", [$request, $server, $config]) };
|
my $output = eval { WebGUI::Pluggable::run($handler->{$regex}, "handler", [$request, $server, $config]) };
|
||||||
if ($@) {
|
if ($@) {
|
||||||
die $@ if ($@ =~ "^fatal:");
|
die $@ if ($@ =~ "^fatal:");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue