mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-07 13:24:22 +00:00
fix: application/json content type from PHP handled correctly in JS
This commit is contained in:
@@ -216,7 +216,9 @@ function fd(url,gd,hd,id){
|
||||
if(jd.readyState==4){
|
||||
if(jd.status==200){
|
||||
var kd=jd.getResponseHeader('Content-Type');
|
||||
kd=kd.substr(0,kd.indexOf(';'));
|
||||
if (kd.indexOf(';') > -1) {
|
||||
kd=kd.substr(0,kd.indexOf(';'));
|
||||
}
|
||||
switch(kd){
|
||||
case'application/json':
|
||||
if (jd.responseText.indexOf('[]') < 0) {
|
||||
|
||||
Reference in New Issue
Block a user