Bug 886408
Summary: | human-editable XML detected as application/xml MIME type | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Florian Weimer <fweimer> |
Component: | file | Assignee: | Jan Kaluža <jkaluza> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | jkaluza, jorton, vanmeeuwen+fedora |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | 886005 | Environment: | |
Last Closed: | 2012-12-13 08:47:33 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 886005 | ||
Bug Blocks: |
Description
Florian Weimer
2012-12-12 08:50:39 UTC
I think application/xml is preferred mime type for xml files. - shared-mime-type (mime-type database used by KDE/Gnome and others) uses application/xml too and I think File should stay consistent with it (see http://lists.freedesktop.org/archives/xdg/2005-December/005962.html). - there are tries to deprecate text/xml in recent XML specification drafts. - returning text/xml mime-type without proper charset detection (which is not File's case) would mean that the documents could not be parsed at all (see http://annevankesteren.nl/2005/03/text-xml) - I don't see a way how File could detect that XML "is readable by casual users". I admit most of them probably are, but without a way how to detect it, it's safer in current situation (see the points I made above), to return application/xml. > For example, on Debian, XML documents are treated as text and no > svn:mime-type is set because file reports different MIME types there. It probably depends on XML file. Some of them could be detected as XHTML and then they have text/* mime-type. That's the same as on Fedora. file-5.04 on Debian: # file -i ./xml/iso-codes/iso_15924.xml ./xml/iso-codes/iso_15924.xml: application/xml; charset=utf-8 file-5.11 on Debian: # file -i ./xml/iso-codes/iso_15924.xml ./xml/iso-codes/iso_15924.xml: application/xml; charset=utf-8 Of course you can contact File upstream ([1], [2]) and maybe they will have different opinion. In that case I'm more than happy to backport upstream patch for this. For now I will close it as NOTABUG. [1] http://mx.gw.com/mailman/listinfo/file [2] http://bugs.gw.com/ |