summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-07-22 07:16:20 +0200
committerByron Jones <bjones@mozilla.com>2013-07-22 07:16:20 +0200
commitfac13963f90de2ec70b6ef86e6820b2c4b989eee (patch)
treeee57c2a4e25b0bab7db082e554b0745a9531ad03
parent15c7945d2392feb7507cc3bae1b1e71746b82059 (diff)
downloadbugzilla-fac13963f90de2ec70b6ef86e6820b2c4b989eee.tar.gz
bugzilla-fac13963f90de2ec70b6ef86e6820b2c4b989eee.tar.xz
use the better fix for checking for REST responses
https://bugzilla.mozilla.org/show_bug.cgi?id=895306
-rw-r--r--mod_perl.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/mod_perl.pl b/mod_perl.pl
index 740348887..627057777 100644
--- a/mod_perl.pl
+++ b/mod_perl.pl
@@ -122,6 +122,7 @@ package Bugzilla::ModPerl::ResponseHandler;
use strict;
use base qw(ModPerl::Registry);
use Bugzilla;
+use Bugzilla::Constants qw(USAGE_MODE_REST);
sub handler : method {
my $class = shift;
@@ -143,7 +144,7 @@ sub handler : method {
# When returning data from the REST api, tell Apache not to append its
# error html documents to the response.
- return substr($0, -9) eq '/rest.cgi'
+ return Bugzilla->usage_mode == USAGE_MODE_REST
? Apache2::Const::OK
: $result;
}