[Python-Dev] Re: New bugtracker project
Richard Jones
rjones@ekit-inc.com
Thu, 23 May 2002 14:13:42 +1000
On Thu, 23 May 2002 14:01, Guido van Rossum wrote:
> I think SF's problem is that far too often it guesses that the type is
> not text/<something>, and then most browsers won't show it. This is
> annoying for source code and diffs. If you could force the guess to
> be text/plain for .c, .h, .py, .diff, and .patch, that would be solved.
If submitted via the web, Roundup is able to guess the MIME type and will
serve up "source_file.py" as text/x-python, but "source_file" as
application/octet-stream.
If it's submitted by email, it'll keep the content-type it was submitted with.
I guess a pass could be made to see if it's all printable characters before
defaulting to a/o-s.
An alternative is to have overrides for certain file extensions, and default
to text/plain. Not pretty.
Richard