summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-02-18 22:39:43 +0100
committerDylan William Hardison <dylan@hardison.net>2018-03-10 21:54:38 +0100
commit6a995f2c172e4497df6683d978c7823647dcb2ed (patch)
treeed8ca494686e0eb355858ead4384a972f6209a77 /extensions
parent5ee20b480b45ff9c66b7de3e957f7d0b6ed19ddb (diff)
downloadbugzilla-6a995f2c172e4497df6683d978c7823647dcb2ed.tar.gz
bugzilla-6a995f2c172e4497df6683d978c7823647dcb2ed.tar.xz
initial psgi support
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BzAPI/Extension.pm9
-rw-r--r--extensions/Push/lib/Logger.pm2
2 files changed, 10 insertions, 1 deletions
diff --git a/extensions/BzAPI/Extension.pm b/extensions/BzAPI/Extension.pm
index bb9805134..1f7cce04a 100644
--- a/extensions/BzAPI/Extension.pm
+++ b/extensions/BzAPI/Extension.pm
@@ -15,6 +15,7 @@ use base qw(Bugzilla::Extension);
use Bugzilla::Extension::BzAPI::Constants;
use Bugzilla::Extension::BzAPI::Util qw(fix_credentials filter_wants_nocache);
+use Bugzilla::PSGI qw(compile_cgi);
use Bugzilla::Error;
use Bugzilla::Util qw(trick_taint datetime_from);
@@ -188,6 +189,14 @@ sub webservice_status_code_map {
$status_code_map->{51} = STATUS_BAD_REQUEST;
}
+sub psgi_builder {
+ my ($self, $args) = @_;
+ my $mount = $args->{mount};
+
+ $mount->{'bzapi'} = compile_cgi('extensions/BzAPI/bin/rest.cgi');
+}
+
+
#####################
# Utility Functions #
#####################
diff --git a/extensions/Push/lib/Logger.pm b/extensions/Push/lib/Logger.pm
index 833cb3b19..7ae96b58a 100644
--- a/extensions/Push/lib/Logger.pm
+++ b/extensions/Push/lib/Logger.pm
@@ -31,11 +31,11 @@ sub debugging {
}
sub _log_it {
- require Apache2::Log;
my ($self, $method, $message) = @_;
return if $method eq 'DEBUG' && !$self->debugging;
chomp $message;
if ($ENV{MOD_PERL}) {
+ require Apache2::Log;
Apache2::ServerRec::warn("Push $method: $message");
} elsif ($ENV{SCRIPT_FILENAME}) {
print STDERR "Push $method: $message\n";