Bug 57416

Summary: Missing mimetype for MHTML archives
Product: shared-mime-info Reporter: Allan Sandfeld Jensen <kde>
Component: freedesktop.org.xmlAssignee: Shared Mime Info group <shared_mime_info>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch

Description Allan Sandfeld Jensen 2012-11-22 15:53:37 UTC
MHTML archive supported by all major browsers (see http://en.wikipedia.org/wiki/Mhtml ) is not recognized by the shared mimetype-database. 

The mimetypes used for it are message/multipart and application/x-mimearchive, and globs *.mht and *.mhtml.

Note that the actual format used is the same as what is used for message/rfc822, message/partial and probably others, so you may want to define a common parent for MIME formated documents.
Comment 1 Allan Sandfeld Jensen 2012-11-22 16:02:01 UTC
Sorry, multipart/related is the commonly used not message/multipart.

Btw, the format is documented in http://tools.ietf.org/html/rfc2557
Comment 2 Allan Sandfeld Jensen 2013-01-07 12:05:54 UTC
Created attachment 72619 [details] [review]
Patch

Proposed patch. Adds application/x-mimearchive and makes it a subtype of multipart/related, since the encoding is a specific usecase of multipart/related.
Comment 3 Bastien Nocera 2013-02-12 16:13:14 UTC
Comment on attachment 72619 [details] [review]
Patch

Review of attachment 72619 [details] [review]:
-----------------------------------------------------------------

Looks good otherwise.

::: freedesktop.org.xml.in
@@ +2453,5 @@
>      <sub-class-of type="video/webm"/>
>    </mime-type>
> +  <mime-type type="application/x-mimearchive">
> +    <_comment>MHTML web archive</comment>
> +    <acronym>MHTML</acronym>

expanded-acronym is missing.
Comment 4 Allan Sandfeld Jensen 2013-02-12 16:31:23 UTC
(In reply to comment #3)
> Comment on attachment 72619 [details] [review] [review]
> Patch
> 
> Review of attachment 72619 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> Looks good otherwise.
> 
> ::: freedesktop.org.xml.in
> @@ +2453,5 @@
> >      <sub-class-of type="video/webm"/>
> >    </mime-type>
> > +  <mime-type type="application/x-mimearchive">
> > +    <_comment>MHTML web archive</comment>
> > +    <acronym>MHTML</acronym>
> 
> expanded-acronym is missing.

Well, it stands for MIME HTML, which is another set of acronyms.
Comment 5 Bastien Nocera 2013-02-12 17:30:55 UTC
After fixing the mismatching elements:

commit 5dc7a385dfde27baabbe7384e69605c48adbf1e4
Author: Allan Sandfeld <kde@carewolf.com>
Date:   Mon Jan 7 12:05:00 2013 +0000

    Add MHTML mime-type
    
    https://bugs.freedesktop.org/show_bug.cgi?id=57416

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.