]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 905948: under mod_perl, HTTP/200 is returned when etags match If-None-Match
authorByron Jones <bjones@mozilla.com>
Mon, 19 Aug 2013 03:38:09 +0000 (11:38 +0800)
committerByron Jones <bjones@mozilla.com>
Mon, 19 Aug 2013 03:38:09 +0000 (11:38 +0800)
r=dkl, a=glob

mod_perl.pl

index 1f4593f009cc403d2868d396e177f8696d305265..572bcc7f9722a3bec78894dd02e04ba59c50c6f3 100644 (file)
@@ -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;
 }