Bug 21949 - InternetShortcut files recognized as text/x-uri but should be application/x-mswinurl
Summary: InternetShortcut files recognized as text/x-uri but should be application/x-m...
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Shared Mime Info group
QA Contact:
URL: https://bugs.launchpad.net/ubuntu/+so...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-26 13:54 UTC by 7qia0tp02
Modified: 2011-05-25 07:25 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description 7qia0tp02 2009-05-26 13:54:06 UTC
Forgive me if this is the wrong place or the wrong information, but in Ubuntu, files with .URL extension and [InternetShortcut] magic word (used to store Favorites in IE, for instance) are being recognized as "resource location (text/x-uri)", and we're trying to figure out how to get it recognized correctly (application/x-mswinurl) and then associate that type with a launcher script.

The [InternetShortcut] magic word and .url glob are defined in /usr/share/packages/freedesktop.org.xml, so I thought I'd bring it up here.

  <mime-type type="application/x-mswinurl">
    <_comment>Internet shortcut</_comment>
    <magic priority="50">
      <match type="string" value="InternetShortcut" offset="1"/>
      <match type="string" value="DEFAULT" offset="1">
        <match type="string" value="BASEURL=" offset="10"/>
      </match>
    </magic>
  </mime-type>

...

  <mime-type type="text/x-uri">
    <_comment>resource location</_comment>
    <sub-class-of type="text/plain"/>
    <!-- Note: text/uri-list is reserved by the XDND protocol! -->
    <glob pattern="*.uri"/>
    <glob pattern="*.url"/>
  </mime-type>

So it seems the glob definition is overriding the magic word definition?  If I change the file extension it is recognized correctly.  Does the priority need to be changed, then?

Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/gnome-mime-data/+bug/185165

Thanks
Comment 1 Bastien Nocera 2011-05-25 07:25:15 UTC
commit 446468bf39b14c7b0e685cab6c003f52e875b7b2
Author: Bastien Nocera <hadess@hadess.net>
Date:   Wed May 25 15:24:26 2011 +0100

    Remove glob from text/x-uri
    
    It's never actually used, and *.url clashes with application/x-mswinurl
    which is widely used.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=21949


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.