diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index bb6fd7a8a..edb281391 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,6 +1,7 @@ 7.5.1 - rfe: maintenance - turn on/off maintenance mode from the command line - 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.) http://www.plainblack.com/bugs/tracker/rss-missing-in-message - fix: Friends language error (perlDreamer Consulting, LLC.) diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index 960bd149f..4d3dffbf0 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -458,7 +458,7 @@ # { "^/perl-status$" : "WebGUI::URL::PassThru" }, { "^/uploads/dictionaries" : "WebGUI::URL::Unauthorized" }, { "^/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" }, { ".*" : "WebGUI::URL::Content" } ], diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index 4a2b05ca2..0acf35727 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -63,9 +63,14 @@ sub handler { my $server = Apache2::ServerUtil->server; #instantiate the server api my $config = WebGUI::Config->new($server->dir_config('WebguiRoot'), $configFile); #instantiate the config object 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")}) { 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]) }; if ($@) { die $@ if ($@ =~ "^fatal:");