Mike. Michael Kaply wrote: > > As I said in my second post, the issue here is unknown extensions and > local files. > > On unix, mailcap and mime.types files are provided. On windows, all the > extensions are in the registry mapped to mime types.
Yes, I'm aware of this. > Mapping multiple extensions to one mime type is very easy. Since the > file is indexed by extension, we can have any extension map to any mime > type. The problem I was referring to isn't mapping multiple file extensions to one MIME type. Neither the Windows registry nor Unix solve this problem reliably. It is a problem that presents itself frequently as there are media types out there that share the same file extensions. If you store the files on disk and then rely solely on the file extension to determine the MIME type, then you will oftentimes pick the wrong MIME type based you have a one-to-one mapping from a file extension to a MIME type. This is what happens on Windows and Linux with the current non-solutions. I think a much more elegant solution in OS/2 would be to use something like a MIMETYPE Extended Attribute on the files to query the MIME type. This EA may in fact already be defined. If it is not, I think it is an opportunity for Warpzilla here to innovate a little and use it. Warpzilla could write this new MIMETYPE EA to files that it saves from the web, where the MIME type is available, to the local disk. That way, if the file is loaded later on in Warpzilla, the same MIME type will be available, regardless of the extension, or the filename that the user chooses to save the file as. I believe this is similar to the way the Mac does things, and the proper way to do things in OS/2.
