aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Weiske <christian.weiske@netresearch.de>2013-09-04 15:51:58 +0200
committerChristian Weiske <christian.weiske@netresearch.de>2013-09-04 15:51:58 +0200
commitfe6c3d3a27c1d44c185552b2b7c8560bc3cd3bf9 (patch)
treeb3b6dfc6c77f9f247a8fe8a452ba1d178682910b /src
parent4fbcf4905db42c59dcb3a9322a8c9d8bbd857417 (diff)
downloadphorkie-fe6c3d3a27c1d44c185552b2b7c8560bc3cd3bf9.tar.gz
phorkie-fe6c3d3a27c1d44c185552b2b7c8560bc3cd3bf9.zip
detect xml and json as text
Diffstat (limited to 'src')
-rw-r--r--src/phorkie/File.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/phorkie/File.php b/src/phorkie/File.php
index 63d23e6..dc90d9b 100644
--- a/src/phorkie/File.php
+++ b/src/phorkie/File.php
@@ -165,7 +165,9 @@ class File
$type = $GLOBALS['phorkie']['languages'][$ext]['mime'];
return substr($type, 0, 5) === 'text/'
- || $type == 'application/javascript';
+ || $type == 'application/javascript'
+ || substr($type, -4) == '+xml'
+ || substr($type, -5) == '+json';
}
}