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:
jamesryanbell 2014-03-17 16:11:49 +00:00
parent 6fbf3dd7c4
commit 4fc96ebb7b
1 changed files with 2 additions and 2 deletions

View File

@ -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;
} }