8000 merged branch romainneutron/file-binary-guesser (PR #7006) · symfony/symfony@7a35cb7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a35cb7

Browse files
committed
merged branch romainneutron/file-binary-guesser (PR #7006)
This PR was merged into the 2.0 branch. Commits ------- a12744e Add dot character `.` to legal mime subtype regular expression Discussion ---------- [HttpFoundation][2.0] Add dot character `.` to legal mime subtype regular expression | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT For example, the following mimetype (used for Microsoft powerpoints) is not recognized given the current regexp : `application/vnd.ms-powerpoint; charset=binary`
2 parents 4b30ae6 + a12744e commit 7a35cb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function guess($path)
6262

6363
$type = trim(ob_get_clean());
6464

65-
if (!preg_match('#^([a-z0-9\-]+/[a-z0-9\-]+)#i', $type, $match)) {
65+
if (!preg_match('#^([a-z0-9\-]+/[a-z0-9\-\.]+)#i', $type, $match)) {
6666
// it's not a type, but an error message
6767
return null;
6868
}

0 commit comments

Comments
 (0)
0