From 790c3d21c61ef268ee87d16ecd394386cdcaee68 Mon Sep 17 00:00:00 2001 From: "bzrmirror%bugzilla.org" Date: Mon, 19 Aug 2013 03:48:59 +0000 Subject: [PATCH] Bug 905948: under mod_perl, HTTP/200 is returned when etags match If-None-Match r=dkl, a=glob git-svn-id: svn://10.0.0.236/trunk@264974 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/mod_perl.pl | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index 0e821010c69..1afaaca5aed 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -8704 \ No newline at end of file +8705 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/mod_perl.pl b/mozilla/webtools/bugzilla/mod_perl.pl index 1f4593f009c..572bcc7f972 100755 --- a/mozilla/webtools/bugzilla/mod_perl.pl +++ b/mozilla/webtools/bugzilla/mod_perl.pl @@ -135,9 +135,10 @@ sub handler : method { Bugzilla::init_page(); my $result = $class->SUPER::handler(@_); - # When returning data from the REST api, tell Apache not to append its - # error html documents to the response. - return Bugzilla->usage_mode == USAGE_MODE_REST + # When returning data from the REST api we must only return 200 or 304, + # which tells Apache not to append its error html documents to the + # response. + return Bugzilla->usage_mode == USAGE_MODE_REST && $result != 304 ? Apache2::Const::OK : $result; }