tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Lamar (JIRA)" <j...@apache.org>
Subject [jira] [Created] (TIKA-1563) Use .gz as the default extension for application/gzip
Date Sun, 01 Mar 2015 16:53:04 GMT
Adam Lamar created TIKA-1563:

             Summary: Use .gz as the default extension for application/gzip
                 Key: TIKA-1563
                 URL: https://issues.apache.org/jira/browse/TIKA-1563
             Project: Tika
          Issue Type: Bug
          Components: core
            Reporter: Adam Lamar
            Priority: Minor

This ticket is in reference to the following code:

MimeType mimeType = config.getMimeRepository().forName("application/gzip"); 
String extension = mimeType.getExtension();

The string extension will be ".tgz". While it is possible to get .gz or other common extensions
with mimeType.getExtensions(), it would be nice if the default was .gz. Every .tgz is an application/gzip,
but every application/gzip is not a .tgz. 

Note that although the code above uses the static mime type application/gzip, it is more likely
that real-world code is performing mime type detection on specific files and looking up the
returned type in the mime registry. Returning .gz for a gzipped tarball isn't wrong, but is
less specific than its real type. However, returning .tgz for gzipped text is incorrect.

This message was sent by Atlassian JIRA

View raw message