From 0e5544d301ef461ccca24af023f4dd52aebf3a10 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 21 Jul 2016 14:50:10 +0200 Subject: [PATCH] Fixed response type check for ajax requests --- wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.20.1