Skip to content

Commit

Permalink
Add plus character + to legal mime subtype
Browse files Browse the repository at this point in the history
For example, the following mime type (used for epub) is not recognized given the current regexp: `application/epub+zip`
  • Loading branch information
ilzrv authored and nicolas-grekas committed Oct 12, 2019
1 parent 233f40c commit 4db558c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion File/MimeType/FileBinaryMimeTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function guess($path)

$type = trim(ob_get_clean());

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

0 comments on commit 4db558c

Please sign in to comment.