From fac13963f90de2ec70b6ef86e6820b2c4b989eee Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 22 Jul 2013 13:16:20 +0800 Subject: use the better fix for checking for REST responses https://bugzilla.mozilla.org/show_bug.cgi?id=895306 --- mod_perl.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3-24-g4f1b