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`
This commit is contained in:
parent
fefb2ff020
commit
56895f12b9
@ -89,7 +89,7 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface
|
|||||||
|
|
||||||
$type = trim(ob_get_clean());
|
$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
|
// it's not a type, but an error message
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user