small fix for server svg mimetype detection

This commit is contained in:
Robin Appelman 2012-01-14 23:37:50 +01:00
parent 0c76884f98
commit 0ac9e56da9
1 changed files with 6 additions and 4 deletions

View File

@ -191,11 +191,13 @@ SVGSupport.checkMimeType=function(){
$.each(headerParts,function(i,text){
if(text){
var parts=text.split(':',2);
var value=parts[1].trim();
if(value[0]=='"'){
value=value.substr(1,value.length-2);
if(parts.length==2){
var value=parts[1].trim();
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'){