small fix for server svg mimetype detection
This commit is contained in:
parent
0c76884f98
commit
0ac9e56da9
|
@ -191,12 +191,14 @@ SVGSupport.checkMimeType=function(){
|
||||||
$.each(headerParts,function(i,text){
|
$.each(headerParts,function(i,text){
|
||||||
if(text){
|
if(text){
|
||||||
var parts=text.split(':',2);
|
var parts=text.split(':',2);
|
||||||
|
if(parts.length==2){
|
||||||
var value=parts[1].trim();
|
var value=parts[1].trim();
|
||||||
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]]=value;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if(headers["Content-Type"]!='image/svg+xml'){
|
if(headers["Content-Type"]!='image/svg+xml'){
|
||||||
replaceSVG();
|
replaceSVG();
|
||||||
|
|
Loading…
Reference in New Issue