8000 Add plus character `+` to legal mime subtype · symfony/symfony@56895f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 56895f1

Browse files
ilzrvnicolas-grekas
authored andcommitted
Add plus character + to legal mime subtype
For example, the following mime type (used for epub) is not recognized given the current regexp: `application/epub+zip`
1 parent fefb2ff commit 56895f1

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
@@ -89,7 +89,7 @@ public function guess($path)
8989

9090
$type = trim(ob_get_clean());
9191

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

0 commit comments

Comments
 (0)
0