summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-01-14 23:37:50 +0100
committerRobin Appelman <icewind@owncloud.com>2012-01-14 23:41:48 +0100
commit0ac9e56da929fdac9507b386139c7e24f131cdf1 (patch)
treea830d2957bf71bdb69f44e19721ff39919381d95 /core
parent0c76884f9884fe0bbc0479f7380a0429adba80c3 (diff)
downloadnextcloud-server-0ac9e56da929fdac9507b386139c7e24f131cdf1.tar.gz
nextcloud-server-0ac9e56da929fdac9507b386139c7e24f131cdf1.zip
small fix for server svg mimetype detection
Diffstat (limited to 'core')
-rw-r--r--core/js/js.js10
1 files changed, 6 insertions, 4 deletions
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'){