summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-04-10 17:40:45 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-04-10 17:40:45 +0000
commit3b9f235e42da7d862fae7b4da7ea008b98493832 (patch)
tree041cf6e5c87e0e6aa6436be1de86e602043b6c08 /lib/util.php
parentc9c5ec0e4beea45d6257a263e5e0f0d4e6c57025 (diff)
Trimming the accept header parts for better content type comparison.
e.g., ' text/xml' != 'text/xml'
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index 612aa3109..888765548 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1152,7 +1152,7 @@ function common_accept_to_prefs($accept, $def = '*/*')
foreach($parts as $part) {
// FIXME: doesn't deal with params like 'text/html; level=1'
- @list($value, $qpart) = explode(';', $part);
+ @list($value, $qpart) = explode(';', trim($part));
$match = array();
if(!isset($qpart)) {
$prefs[$value] = 1;
@@ -1391,4 +1391,4 @@ function common_database_tablename($tablename)
}
//table prefixes could be added here later
return $tablename;
-} \ No newline at end of file
+}