Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] Make MimeTypeExtensionGuesser case insensitive#31084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:3.4fromvermeirentony:patch-1
Apr 17, 2019

Conversation

@vermeirentony
Copy link
Contributor

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#...
LicenseMIT
Doc PRsymfony/symfony-docs#...

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 isapplication/vnd.ms-excel.sheet.macroEnabled.12
The key that matches the xlsm extension in the$defaultExtensions array isapplication/vnd.ms-excel.sheet.macroenabled.12

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

Copy link
Contributor

@ro0NLro0NL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@ro0NL
Copy link
Contributor

this needs a patch for master as well, whereMimeTypes is a new class.

@nicolas-grekasnicolas-grekas added this to thenext milestoneApr 14, 2019
@nicolas-grekas
Copy link
Member

@vermeirentony can you add a test case please?

@nicolas-grekasnicolas-grekas modified the milestones:next,3.4Apr 14, 2019
@vermeirentony
Copy link
ContributorAuthor

@nicolas-grekas
test case (3.4) can be found onhttps://github.com/vermeirentony/mimetype-testcase

@Simperfit
Copy link
Contributor

@vermeirentony Thanks for the contribution,

I think by testcase Nicolas was meaning a test directly in the framework with PHPUnit, could you do that please ?

@vermeirentony
Copy link
ContributorAuthor

@Simperfit sure, will write one later today

@vermeirentony
Copy link
ContributorAuthor

@nicolas-grekas I just added the unit test

@fabpot
Copy link
Member

@vermeirentony Can you squash your commits before merging? Right now, you've used 2 different identities for your commits. You probably need to keep the one here on Github.

@vermeirentony
Copy link
ContributorAuthor

@fabpot squashed the 3 commits into one

@fabpotfabpot merged commite294ee6 intosymfony:3.4Apr 17, 2019
fabpot pushed a commit that referenced this pull requestApr 17, 2019
…itive (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-exampleCommits-------e294ee6 Make MimeTypeExtensionGuesser case insensitive
@nicolas-grekas
Copy link
Member

Thank you@vermeirentony

This was referencedApr 17, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+2 more reviewers

@ro0NLro0NLro0NL approved these changes

@SimperfitSimperfitSimperfit approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

6 participants

@vermeirentony@ro0NL@nicolas-grekas@Simperfit@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp