> It's not a matter of the wrong mime type, it's a matter of the wrong file.
Agreed. That should indeed be addessed. Not very easy to do, though...
> I wouldn't object to associated types as long as there's a distinction between a
> stream of unknown type which is treated as a default type and a stream that
> actually is the default type.
Pretty nontrivial to make, this distinction... What is a "default type"?
> Would typing a stream require a push-back buffer of a rather large size?
We use a 1024-byte buffer right now; that does a decent job except on HTML that
starts with lots of whitespace or binary files that start off with a lot of
ascii bits. In general, anything below 512 bytes would be too unreliable, imo.
> OK, give me a few hints of where to start looking. It seems odd,
> though. Can't you just attach a data block containing all this ancillary
> stuff to a stream and just output that block first?
That's what happens, but the data block is created before the file has been
opened and all. See nsHTMLInputElement.cpp and nsFormSubmission.cpp.
Boris
--
We are all agreed that your theory is crazy. The
question which divides us is whether it is crazy enough
to have a chance of being correct. My own feeling is
that it is not crazy enough.
-- Niels Bohr