From: Alexander Moisseev Date: Fri, 10 Jul 2026 16:31:49 +0000 (+0300) Subject: [Minor] WebUI: drop unreachable 304 success branch X-Git-Tag: 4.1.3~52^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=29d76e4a205e7e255c4793ec80e398658f0196a9;p=thirdparty%2Frspamd.git [Minor] WebUI: drop unreachable 304 success branch The Rspamd controller sends "Cache-Control: no-store" on every WebUI response (controller.c, issue #3330) and never emits Last-Modified/ETag for these endpoints, so a browser never revalidates and a 304 response is impossible. The `|| xhr.status === 304` in queryServer was dead code copied from jQuery's default success range. Remove it so queryServer, the /stat connect probe and the legacy /auth probe all treat 200-299 as success. Treating 304 as an error is also safer: a 304 body is empty, and success would have fed it to the JSON parser. --- diff --git a/interface/js/app/common.js b/interface/js/app/common.js index 06207ba7a7..d4f3ae1784 100644 --- a/interface/js/app/common.js +++ b/interface/js/app/common.js @@ -532,7 +532,7 @@ define(["nprogress"], } xhr.onload = function () { - const ok = (xhr.status >= 200 && xhr.status < 300) || xhr.status === 304; + const ok = xhr.status >= 200 && xhr.status < 300; if (!ok) { handleError("error", xhr.statusText); return;