How to create a new MIME type for a Sugar activity?

Albert Cahalan acahalan at gmail.com
Sat Feb 9 06:32:53 EST 2008


James Simmons writes:

> I agree I have no business inventing my own MIME type.

Yes you do, and you should ignore the "x-" disaster.
Pick something sane, descriptive but not too generic,
and be done with it.

(If you use "x-", then you **still** face any collision
problems and you're expected to register the type anyway.
Since there would be "x-" data out in the wild, everybody
would need to support that until the end of time as well.
As they say, it is easier to ask forgiveness than permission.)

> What I really want is a file suffix association like I can
> do with Windows or Midnight Commander on Linux.

This needs to be required for every MIME association.
(if you don't ask for a file extension, no MIME for you!)

Because no common filesystem uses MIME types, the MIME data
is unstable. This is a security hazard. Data shows up one way,
suffers MIME damage (normally) or extension damage, gets sent
along to some other software on the assumption that the original
type info will be used, gets interpreted according to mangled
or alternate type info, and BOOM! You're pwned.

The faster sugar can phase out MIME the better.

> The MIME type of application/zip works, but Etoys is
> using that one too.

Whatever you invent, Etoys will claim it in the next release.
It does not matter if Etoys has any ability to handle the data.

I'm half serious too, as is clear to anybody who has looked at
the list of MIME types claimed by Etoys and tried them.
Almost none make sense. It's like some kind of land grab.



More information about the Devel mailing list