From 35429919e6438ee05a5bc9413952cc30fed9e6b6 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 14 Jan 2016 21:20:18 +0000 Subject: Bug 1239582 - The new REST API fails to work properly under mod_perl due to improper file path passed to bsd_glob() r=dylan --- Bugzilla/API/1_0/Server.pm | 6 +++--- Bugzilla/Install/Requirements.pm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/API/1_0/Server.pm b/Bugzilla/API/1_0/Server.pm index d9780bd63..743af59a1 100644 --- a/Bugzilla/API/1_0/Server.pm +++ b/Bugzilla/API/1_0/Server.pm @@ -20,7 +20,7 @@ use Bugzilla::Hook; use Bugzilla::Util qw(datetime_from trick_taint); use File::Basename qw(basename); -use File::Glob qw(bsd_glob); +use File::Glob qw(:bsd_glob); use List::MoreUtils qw(none uniq); use MIME::Base64 qw(decode_base64 encode_base64); use Moo; @@ -359,8 +359,8 @@ sub _find_resource { $api_namespace, 'API', $api_ext_version, 'Resource', '*.pm'); } else { - $resource_modules = File::Spec->catdir('Bugzilla','API', $api_version, - 'Resource', '*.pm'); + $resource_modules = File::Spec->catdir(bz_locations()->{cgi_path}, + 'Bugzilla','API', $api_version, 'Resource', '*.pm'); } # Load in the WebService modules from the appropriate version directory diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm index a48778c1b..ccd3a649a 100644 --- a/Bugzilla/Install/Requirements.pm +++ b/Bugzilla/Install/Requirements.pm @@ -492,8 +492,8 @@ use constant FEATURE_FILES => ( jsonrpc => ['Bugzilla/WebService/Server/JSONRPC.pm', 'jsonrpc.cgi'], xmlrpc => ['Bugzilla/WebService/Server/XMLRPC.pm', 'xmlrpc.cgi', 'Bugzilla/WebService.pm', 'Bugzilla/WebService/*.pm'], - rest => ['Bugzilla/WebService/Server/REST.pm', 'rest.cgi', - 'Bugzilla/WebService/Server/REST/Resources/*.pm'], + rest => ['Bugzilla/API/Server.pm', 'rest.cgi', + 'Bugzilla/API/*/Server.pm', 'Bugzilla/API/*/Resource/*.pm'], psgi => ['app.psgi'], moving => ['importxml.pl'], auth_ldap => ['Bugzilla/Auth/Verify/LDAP.pm'], -- cgit v1.2.3-24-g4f1b