From: Marcel Werk Date: Wed, 6 May 2020 16:57:53 +0000 (+0200) Subject: Fixed detection of the JSON content-type X-Git-Tag: 3.1.14~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4e480bdc6aea1de6c34b3c7eb222399cf4af572;p=GitHub%2FWoltLab%2FWCF.git Fixed detection of the JSON content-type --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js index f201b47769..6950908afa 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js @@ -230,7 +230,7 @@ define(['Core', 'Language', 'Dom/ChangeListener', 'Dom/Util', 'Ui/Dialog', 'Wolt if (typeof options.success === 'function') { var data = null; - if (xhr.getResponseHeader('Content-Type') === 'application/json') { + if (xhr.getResponseHeader('Content-Type').split(';', 1)[0].trim() === 'application/json') { try { data = JSON.parse(xhr.responseText); }