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

[Mime] fixed wrong mimetype#32986

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:4.3fromrjwebdev:datapart-frompath
Aug 7, 2019
Merged

Conversation

@rjwebdev
Copy link
Contributor

QA
Branch?4.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#32816
LicenseMIT

When creating a datapart from an odt file (and some other extensions), the explode function for the picked mimetype gives a wrong result since there's noapplication/ prefix for the first mimetype of this extension.

In this PR, all mimetypes without a prefix are removed.

@nicolas-grekas
Copy link
Member

The list there is automatically computed so we cannot patch it like that.
Instead, we should make the code that callsexplode() handle the situation.

@rjwebdev
Copy link
ContributorAuthor

So I better revert my changes and catch this error in theDataPart constructor?

@nicolas-grekas
Copy link
Member

yes please

@fabpot
Copy link
Member

Wouldn't it be better to change the code that generates the list to exclude non valid values?

@rjwebdev
Copy link
ContributorAuthor

And where are these lists generated? Should this code be changed or should a check be added on theDataPart::fromPath function?

@fabpot
Copy link
Member

Resources/bin/update_mime_types.php

@rjwebdev
Copy link
ContributorAuthor

I removed the od* file extensions from the generator script.

@fabpot
Copy link
Member

Thank you@rjwebdev.

rjwebdev reacted with thumbs up emoji

@fabpotfabpot merged commite1722c5 intosymfony:4.3Aug 7, 2019
fabpot added a commit that referenced this pull requestAug 7, 2019
This PR was squashed before being merged into the 4.3 branch (closes#32986).Discussion----------[Mime] fixed wrong mimetype| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#32816| License       | MITWhen creating a datapart from an odt file (and some other extensions), the explode function for the picked mimetype gives a wrong result since there's no `application/` prefix for the first mimetype of this extension.In this PR, all mimetypes without a prefix are removed.Commits-------e1722c5 [Mime] fixed wrong mimetype
@rjwebdevrjwebdev deleted the datapart-frompath branchAugust 7, 2019 10:05
@fabpotfabpot mentioned this pull requestAug 26, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

4 participants

@rjwebdev@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp