Here is an implementation of FindMimeFromData, based off of MSDN http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.as...
There is lots of debate on the 'net regarding this "feature" in IE, most of it suggesting this is a bad idea..
One possible change that would work more "standards compliant" rather then "Windows like" would be to return the proposed MIME type unchanged if one is given, otherwise go through the detection methods..let me know if that would be a preferred solution
Changelog Implement FindMimeFromData
On Thu, 18 Mar 2004 11:38:58 -0500, Kevin Koltzau wrote:
Here is an implementation of FindMimeFromData, based off of MSDN http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.as...
Hmm, I'm not sure we should maintain this ourselves. A better approach might be to use the freedesktop shared-mime-data system, which already has scanners for a huge range of mime types in a format we can parse and implement in Wine - I think there is a shared library we could use too.
This seems more straightforward than replicating all that work as there's bound to be mime types reported incorrectly or not at all, and debugging that doesn't sound fun.
thanks -mike
I had thought of that, the major reason I implemented it the way I did was based off of the MSDN document mentioned, which states Windows has a very select list of types that it checks.
IMHO we should really keep the list that is checked to a minimum (being the list Windows checks) as this code is basically doing "If a web server reports a MIME type in this list, ignore it and make our own guess" which is totally wrong standards-wise and a major cause of many problems under IE on Windows..
On Thursday 18 March 2004 11:54 am, Mike Hearn wrote:
On Thu, 18 Mar 2004 11:38:58 -0500, Kevin Koltzau wrote:
Here is an implementation of FindMimeFromData, based off of MSDN http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.as...
Hmm, I'm not sure we should maintain this ourselves. A better approach might be to use the freedesktop shared-mime-data system, which already has scanners for a huge range of mime types in a format we can parse and implement in Wine - I think there is a shared library we could use too.
This seems more straightforward than replicating all that work as there's bound to be mime types reported incorrectly or not at all, and debugging that doesn't sound fun.