well, we can learn if a file is a named pipe or not just by doing a stat (see nsIFile::isSpecial). for normal files, we could just go ahead and sniff the file contents.
Ah, true. That sounds pretty reasonable to me.... I'm still not sure what I want file:// channels to do, to be truthful, because I still want to make it possible to treat .gz files as being content-encoded. But we could certainly do what Axel suggests in the short term and sniff in the GetTypeFromFile code. Of course that needs some refactoring of the sniffer (either factoring out the sniffing code or implementing the sync Convert() function).
-Boris
