Content-Length: 254653 | pFad | https://github.com/symfony/http-foundation/commit/4db558c7c6777aac02293efbfe7c7c5d4c1385c3

BD Add plus character `+` to legal mime subtype · symfony/http-foundation@4db558c · GitHub
Skip to content

Commit 4db558c

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 233f40c commit 4db558c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/symfony/http-foundation/commit/4db558c7c6777aac02293efbfe7c7c5d4c1385c3

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy