SVG support detection
The SVGSupport checkMimeType method was failing on my setup as the headers are all returned in lowercase. I have lowercase all the indexes and modified the if statement so that it doesn't matter what case the headers are returned in
This commit is contained in:
parent
6fbf3dd7c4
commit
4fc96ebb7b
|
@ -712,11 +712,11 @@ SVGSupport.checkMimeType=function(){
|
||||||
if(value[0]==='"'){
|
if(value[0]==='"'){
|
||||||
value=value.substr(1,value.length-2);
|
value=value.substr(1,value.length-2);
|
||||||
}
|
}
|
||||||
headers[parts[0]]=value;
|
headers[parts[0].toLowerCase()]=value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(headers["Content-Type"]!=='image/svg+xml'){
|
if(headers["content-type"]!=='image/svg+xml'){
|
||||||
replaceSVG();
|
replaceSVG();
|
||||||
SVGSupport.checkMimeType.correct=false;
|
SVGSupport.checkMimeType.correct=false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue