Opened 2 months ago
Last modified 10 days ago
#52181 new defect (bug)
wrong mimetime for gzip files
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | 5.6 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
In the file wp-includes/functions.php, function wp_get_mime_types(), the mimetype for gz|gzip is indicated as "application/x-gzip", while fileinfo (and /etc/mimetypes) return "application/gzip".
Also, it seems this line is missing tgz, so I would suggest changing this from:
'gz|gzip' => 'application/x-gzip',
to:
'gz|gzip|tgz' => 'application/gzip',
Attachments (3)
Change History (9)
#2
@
2 months ago
- Keywords has-patch added
Hi there! Thanks for the ticket.
As per this thread https://superuser.com/questions/901962/what-is-the-correct-mime-type-for-a-tar-gz-file tgz in application/gzip
mime type.
Please check the handbook page for creating the patch from src/ https://make.wordpress.org/core/handbook/tutorials/trac/submitting-a-patch/
#3
@
2 months ago
Linking to relevant RFC: https://tools.ietf.org/html/rfc6713
#4
@
5 weeks ago
Hey guys, patch looks good, thanks.
I have just updated it to tweak unit test with the new value.
Patch.