forked from GNUsocial/gnu-social
Trimming the accept header parts for better content type comparison.
e.g., ' text/xml' != 'text/xml'
This commit is contained in:
parent
c9c5ec0e4b
commit
3b9f235e42
@ -1152,7 +1152,7 @@ function common_accept_to_prefs($accept, $def = '*/*')
|
|||||||
|
|
||||||
foreach($parts as $part) {
|
foreach($parts as $part) {
|
||||||
// FIXME: doesn't deal with params like 'text/html; level=1'
|
// FIXME: doesn't deal with params like 'text/html; level=1'
|
||||||
@list($value, $qpart) = explode(';', $part);
|
@list($value, $qpart) = explode(';', trim($part));
|
||||||
$match = array();
|
$match = array();
|
||||||
if(!isset($qpart)) {
|
if(!isset($qpart)) {
|
||||||
$prefs[$value] = 1;
|
$prefs[$value] = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user