]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Minor] WebUI: drop unreachable 304 success branch 6124/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 10 Jul 2026 16:31:49 +0000 (19:31 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 10 Jul 2026 16:31:49 +0000 (19:31 +0300)
commit29d76e4a205e7e255c4793ec80e398658f0196a9
treebb80a6139c63e5e1d0dbf18ea65ce1f00202cafd
parentf116cf0a85c93aacd8f8cf737979de35c126babe
[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.
interface/js/app/common.js