diff --git a/src/Negotiation/FormatNegotiator.php b/src/Negotiation/FormatNegotiator.php index 91c6d8d..8f66a1d 100644 --- a/src/Negotiation/FormatNegotiator.php +++ b/src/Negotiation/FormatNegotiator.php @@ -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; } diff --git a/tests/Negotiation/Tests/FormatNegotiatorTest.php b/tests/Negotiation/Tests/FormatNegotiatorTest.php index 8450882..5dbf4b3 100644 --- a/tests/Negotiation/Tests/FormatNegotiatorTest.php +++ b/tests/Negotiation/Tests/FormatNegotiatorTest.php @@ -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', + ), ); }