diff options
author | David Lawrence <dkl@mozilla.com> | 2015-02-09 17:21:29 +0100 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2015-02-09 17:21:29 +0100 |
commit | 5423c44142dacc974e3e30ad3dc46fe88ab37a1a (patch) | |
tree | 23f6b65dad6128b5c98696a1b687d8f38661fc8d /extensions/BzAPI/bin | |
parent | 7764fb542aec1b2e6758ef7bd232b9346a63c3fb (diff) | |
download | bugzilla-5423c44142dacc974e3e30ad3dc46fe88ab37a1a.tar.gz bugzilla-5423c44142dacc974e3e30ad3dc46fe88ab37a1a.tar.xz |
Bug 1131036: API searches no longer working
Diffstat (limited to 'extensions/BzAPI/bin')
-rwxr-xr-x | extensions/BzAPI/bin/rest.cgi | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/extensions/BzAPI/bin/rest.cgi b/extensions/BzAPI/bin/rest.cgi index 37cbab437..5642ad550 100755 --- a/extensions/BzAPI/bin/rest.cgi +++ b/extensions/BzAPI/bin/rest.cgi @@ -26,6 +26,15 @@ BEGIN { # BzAPI extension functionality Bugzilla->request_cache->{bzapi} = 1; +# Strip trailing slash before attempting match +# otherwise native REST will complain +my $path_info = Bugzilla->cgi->path_info; +if ($path_info =~ s'/$'') { + # Remove first slash as cgi->path_info expects it to + # not be there when setting a new path. + Bugzilla->cgi->path_info(substr($path_info, 1)); +} + use Bugzilla::WebService::Server::REST; Bugzilla->usage_mode(USAGE_MODE_REST); local @INC = (bz_locations()->{extensionsdir}, @INC); |