Open MaximilianKresse opened 4 years ago
That's a good catch I think and it should be fixed :).
The zip
and gzip
are different MIME types.
@ralouphie, do you have any idea about this :)?
This repository is meant to be a wrapper for httpd's mime types mapping. If a different mapping is needed, please leverage the custom mappings capability described in the documentation.
@ralouphie, thanks for your reply.
According to the httpd mime type doc, it seems that this zip is different mime types.
They're as follows:
application/zip zip
# application/gzip
Do you mean the # application/gzip
is customized mapping?
If yes, and I think you're right. And this issue will be closed :).
Hi @ralouphie
According to the httpd mime doc @peter279k mentioned, mime type for zip
extension should be application/zip
zip files are widespread and are important part of web services, so I see it as important to resolve.
Would you let us know what's needed to help progress resolution of this issue, a PR? :)
It seems that the repository owner doesn't concern this PR for about whiles.
And I think it should add some collaborator on this repository.
Ran into this issue also as the method forces the value at ZERO pointer.
https://github.com/ralouphie/mimey/blob/develop/src/MimeTypes.php#L52
The non-standard x-gzip
should arguably be at the end of this array or advised use of getAllMimeTypes
in all cases.
https://github.com/ralouphie/mimey/blob/develop/mime.types.php#L32
'zip' =>
array (
0 => 'application/x-gzip',
1 => 'application/zip',
),
Code
Expected result
Actual result
This wrong mime type means that e.g. Firefox and Chrome handle the file as gzip instead of a zip file and actively renaming the file. The problem is probably the order in the default configuration: https://github.com/ralouphie/mimey/blob/develop/mime.types.php#L34
Is there a reason for this order or is this a bug?