8000 bug #33965 [HttpFoundation] Add plus character `+` to legal mime subt… · symfony/symfony@a8a4aad · GitHub
[go: up one dir, main page]

Skip to content

Commit a8a4aad

Browse files
bug #33965 [HttpFoundation] Add plus character + to legal mime subtype (ilzrv)
This PR was merged into the 3.4 branch. Discussion ---------- [HttpFoundation] Add plus character `+` to legal mime subtype | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - For example, the following mime type (used for epub) is not recognized given the current regexp: `application/epub+zip; charset=binary` Commits ------- 56895f1 Add plus character `+` to legal mime subtype
2 parents fefb2ff + 56895f1 commit a8a4aad

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