small fix for server svg mimetype detection

remotes/origin/stable
Robin Appelman 13 years ago
parent 0c76884f98
commit 0ac9e56da9
  1. 10
      core/js/js.js

@ -191,11 +191,13 @@ 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);
var value=parts[1].trim(); if(parts.length==2){
if(value[0]=='"'){ var value=parts[1].trim();
value=value.substr(1,value.length-2); if(value[0]=='"'){
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'){

Loading…
Cancel
Save