Bug 57416 - Missing mimetype for MHTML archives
Summary: Missing mimetype for MHTML archives
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-22 15:53 UTC by Allan Sandfeld
Modified: 2013-02-12 17:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch (647 bytes, patch)
2013-01-07 12:05 UTC, Allan Sandfeld
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Sandfeld 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 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 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 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.