From: Robin Appelman Date: Sat, 14 Jan 2012 22:37:50 +0000 (+0100) Subject: small fix for server svg mimetype detection X-Git-Tag: v3.0~44 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0ac9e56da929fdac9507b386139c7e24f131cdf1;p=nextcloud-server.git small fix for server svg mimetype detection --- diff --git a/core/js/js.js b/core/js/js.js index 5846d289880..2bb6cff0cb0 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -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'){