This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony
Nicolas Grekas 13113245bf bug #31084 [HttpFoundation] Make MimeTypeExtensionGuesser case insensitive (vermeirentony)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Make MimeTypeExtensionGuesser case insensitive

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Some mime types have a camelCase word in them.
The Apache HTTPD project list items are all lower case.
So I suggest making the $mimeType string lowercase while checking the array key.
That way, we can keep the list in sync.

Example: xlsm file mime type is `application/vnd.ms-excel.sheet.macroEnabled.12`
The key that matches the xlsm extension in the `$defaultExtensions` array is `application/vnd.ms-excel.sheet.macroenabled.12`

Example xlsm file:
https://github.com/vermeirentony/xlsm-example

Commits
-------

e294ee6b9a Make MimeTypeExtensionGuesser case insensitive
2019-04-17 16:51:18 +02:00
..
Bridge [DI] Check service IDs are valid 2019-04-16 13:13:42 +02:00
Bundle Merge remote-tracking branch 'origin/3.4' into 3.4 2019-04-17 16:42:57 +02:00
Component bug #31084 [HttpFoundation] Make MimeTypeExtensionGuesser case insensitive (vermeirentony) 2019-04-17 16:51:18 +02:00