From 3a618937a958950b34e3319b2fa7831eafba048b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 19 Jul 2021 10:24:58 +0200 Subject: [PATCH] do NOT check Content-Type header as it's sometimes not set to application/json parsing JSON will error out, if payload is no JSON anyway happens with mark-as-spam and SpamTitan --- api/js/jsapi/egw_json.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/jsapi/egw_json.js b/api/js/jsapi/egw_json.js index 020dab9626..f273b5b561 100644 --- a/api/js/jsapi/egw_json.js +++ b/api/js/jsapi/egw_json.js @@ -233,7 +233,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) { promise = (this.egw.window?this.egw.window:window).fetch(url, init) .then((response) => { - if (!response.ok || !response.headers.get('Content-Type').startsWith('application/json')) { + if (!response.ok) { throw response; } return response.json();