From 3b9f235e42da7d862fae7b4da7ea008b98493832 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 10 Apr 2009 17:40:45 +0000 Subject: Trimming the accept header parts for better content type comparison. e.g., ' text/xml' != 'text/xml' --- lib/util.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/util.php') 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 +} -- cgit v1.2.3-54-g00ecf