diff options
author | jamesryanbell <james@james-bell.co.uk> | 2014-03-17 16:11:49 +0000 |
---|---|---|
committer | jamesryanbell <james@james-bell.co.uk> | 2014-03-17 16:11:49 +0000 |
commit | 4fc96ebb7b51333497a126658989cb85669aa6dd (patch) | |
tree | 5cc4222d832329cad5e8cb09b1744778db485448 | |
parent | 6fbf3dd7c4e64a68d2b8a0a2c24a1b92de7868b1 (diff) | |
download | nextcloud-server-4fc96ebb7b51333497a126658989cb85669aa6dd.tar.gz nextcloud-server-4fc96ebb7b51333497a126658989cb85669aa6dd.zip |
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
-rw-r--r-- | core/js/js.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js index 841f3a769f1..9ca0730fa6f 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -712,11 +712,11 @@ SVGSupport.checkMimeType=function(){ if(value[0]==='"'){ 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(); SVGSupport.checkMimeType.correct=false; } |