Skip to content

Commit

Permalink
Add a failing test with IE8 Accept
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardosoliv authored and willdurand committed Feb 20, 2014
1 parent e7460fb commit 1fb776e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Negotiation/FormatNegotiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getBest($header, array $priorities = array())
}
}

// If $priorities is empty or contains a catch-all mime type
// if `$priorities` is empty or contains a catch-all mime type
if ($catchAllEnabled) {
return array_shift($acceptHeaders) ?: null;
}
Expand Down
10 changes: 10 additions & 0 deletions tests/Negotiation/Tests/FormatNegotiatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,16 @@ public static function dataProviderForGetBest()
array(),
'text/html',
),
// IE8 Accept header
array(
'image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*',
array(
'text/html',
'application/xhtml+xml',
'*/*'
),
'text/html',
),
);
}

Expand Down

0 comments on commit 1fb776e

Please sign in to comment.