Re: Assuming "text/plain" for text-like MIME sniffing buffers often leads to problems



On Fri, 2006-03-24 at 20:31 +0100, Christian Neumair wrote:
> When no MIME type is found to match for the contents sniff of a file and
> the buffer looks like text, "text/plain" is assumed. When the
> subclassing information isn't correct (for instance, the current
> shared-mime-info release 0.17 doesn't have "text/plain" =>
> "application/pdf" associations), this will make the contents sniff take
> precedence over the extension and for instance evince can't handle the
> file, and  Nautilus will bail when activating the file.
> I therefore propose to always return XDG_MIME_TYPE_UNKNOWN if the result
> can't be determined.

A pdf sniffed as text? That sounds strange.

Anyway, I think this sounds wrong. We'll detect far less text files if
we do this, meaning you'll be unable to open them instead. Getting the
mime info fixed seems like a better solution.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an underprivileged amnesiac cyborg searching for his wife's true killer. 
She's a vivacious snooty detective with someone else's memories. They fight 
crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]