On Wed, 9 May 2012, Graeme Geldenhuys wrote:

On 9 May 2012 14:51,  <[email protected]> wrote:

It is used by fcl-web. On linux, it loads /etc/mime.types.

I don't know the exact format of that file, I guessed "mime type name"
then "file extension list"

Correct.


But on my Ubuntu 10.04 that file has many lines only showing the "mime
type name" with no extension mentioned. So how reliable is that file
really?


Based on my personal experience: very.
I've had this file in use since 18 years at least, since the first NCSA
webserver installations.

I know Linux (at least Gnome) uses magic numbers (first 2-4 bytes of a
file) to detect the real file type without looking at the file
extension.

A webserver does not do that. It uses the mime file.

the 'file' command looks at the magic numbers, but for example KDE looks at
the extension.

Michael.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to