Opened 12 years ago

Closed 12 years ago

#1160 closed defect

Spelling mistake ? in gmx:MimeFileType type attribute for python file

Reported by: awalsh Owned by: geonetwork-devel@…
Priority: minor Milestone: v2.8.0
Component: General Version: v2.8.0RC2
Keywords: Mime File Type Cc:

Description

Testing GN2.8RC2 + ANZMEST2.8RC2 I upload a file for download (a python script lookup.py). The 'type' attribute of the gmx:MimeFileType element in the online resource element-name has a spelling mistake i.e 'type="text/x-scriptphyton"'

<gmd:protocol><gco:CharacterString> WWW:DOWNLOAD-1.0-http--download </gco:CharacterString> </gmd:protocol>

<gmd:name> <gmx:MimeFileType type="text/x-scriptphyton"> lookup.py </gmx:MimeFileType> </gmd:name> <gmd:description> <gco:CharacterString>The link</gco:CharacterString></gmd:description>

I think (not 100% sure, consult standards) it should be type="text/x-python"

Andrew

Change History (3)

comment:1 by ianwallen, 12 years ago

Andrew,

I believe both are valid - it may more less be a question of which one is more widely used. Based on a quick search on Google it does seem like text/x-python is more widely used but I'm no mime expert.

Also since they both starts with "x-" it means that they are experimental - so neither one is official.

For a list of all the duplicate mime types take a look at the following list which is a merger of several creditable sources. I'm guessing that Geonetwork is based on one of these sources. You will notice that there are a lot of duplicates in the list.

http://code.google.com/p/google-enterprise-connector-manager/source/browse/changes/Brett.Michael.Johnson/fix_issue_62/trunk/projects/connector-manager/etc/ext2mimetype.txt?spec=svn941&r=941

comment:2 by awalsh, 12 years ago

Summary: Spelling mistake in gmx:MimeFileType type attribute for python fileSpelling mistake ? in gmx:MimeFileType type attribute for python file

Ian,

Thank you for that list of file ext/mime types:-

.py text/x-python .py text/x-scriptphyton

Strange, to me anyway, how its spelled 'phyton'. I guess not a big problem leaving it as 'text/x-scriptphyton' for now. As you say the types are not official.

Andrew

comment:3 by simonp, 12 years ago

Status: newclosed

GeoNetwork uses medsea mimeutil which basically gets these lists from the local operating system environment eg. windows registry or unix magic number stuff (although they can be supplemented by any extras you want to add yourself) so any spelling mistakes are present in those environments and not really controlled by GeoNetwork - see WEB-INF/mime-types.properties for how to add your own (suffix based) mimetypes and the medsea mimeutil java docs for how to extend further.

Note: See TracTickets for help on using tickets.