tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Burch (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-1792) Add ASiC-E and ASiC-S mime types
Date Tue, 10 Nov 2015 16:05:11 GMT

    [ https://issues.apache.org/jira/browse/TIKA-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14998818#comment-14998818
] 

Nick Burch commented on TIKA-1792:
----------------------------------

I don't think we can use the mime magic you have supplied, as there is no guarantee that the
mimetype entry will be the first one in the zip. If I re-order the files inside your samples,
then the magic stops working. Sadly, the only way to correctly detect container-based files
such as these is what we do for OOXML, iWorks, ODF and friends, which is with a Zip-specific
container-aware detector

> Add ASiC-E and ASiC-S mime types
> --------------------------------
>
>                 Key: TIKA-1792
>                 URL: https://issues.apache.org/jira/browse/TIKA-1792
>             Project: Tika
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.11
>            Reporter: Roberto Benedetti
>            Priority: Minor
>             Fix For: 2.0, 1.12
>
>         Attachments: report-7.asics, report-8.asice
>
>
> These are the references:
> * [http://www.iana.org/assignments/media-types/application/vnd.etsi.asic-e+zip]
> * [http://www.iana.org/assignments/media-types/application/vnd.etsi.asic-s+zip]
> My {{custom-mimetypes.xml}} is:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <mime-info>
>   <mime-type type="application/vnd.etsi.asic-e+zip">
>     <acronym>ASiC-E</acronym>
>     <_comment>Extended Associated Signature Container</_comment>
>     <magic priority="50">
>       <match value="PK\003\004" type="string" offset="0">
>         <match value="mimetypeapplication/vnd.etsi.asic-e+zip" type="string" offset="30"
/>
>       </match>
>     </magic>
>     <glob pattern="*.asice" />
>   </mime-type>
>   <mime-type type="application/vnd.etsi.asic-s+zip">
>     <acronym>ASiC-S</acronym>
>     <_comment>Simple Associated Signature Container</_comment>
>     <magic priority="50">
>       <match value="PK\003\004" type="string" offset="0">
>         <match value="mimetypeapplication/vnd.etsi.asic-s+zip" type="string" offset="30"
/>
>       </match>
>     </magic>
>     <glob pattern="*.asics" />
>   </mime-type>
> </mime-info>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message