From: Alexander Ebert Date: Thu, 21 Jul 2016 12:50:10 +0000 (+0200) Subject: Fixed response type check for ajax requests X-Git-Tag: 3.0.0_Beta_1~1018 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0e5544d301ef461ccca24af023f4dd52aebf3a10;p=GitHub%2FWoltLab%2FWCF.git Fixed response type check for ajax requests --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js b/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js index 22f618fe4c..ccb4e19eaa 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js @@ -111,7 +111,7 @@ define(['Core', 'Language', 'Dom/ChangeListener', 'Dom/Util', 'Ui/Dialog', 'Wolt this._xhr.onload = function() { if (this.readyState === XMLHttpRequest.DONE) { if (this.status >= 200 && this.status < 300 || this.status === 304) { - if (options.responseType && options.responseType !== this.getResponseHeader('Content-Type')) { + if (options.responseType && this.getResponseHeader('Content-Type').indexOf(options.responseType) !== 0) { // request succeeded but invalid response type self._failure(this, options); }