
Jules Bean wrote:
Isaac Dupree wrote:
When I try to go to one of the Module.hs files, e.g. on darcs.haskell.org, it now has type HS and Firefox refuses to display it (and only lets me download it). Does anyone know how to make Firefox treat certain file types as others (HS as plain text, in particular)? so that I can browse them with any convenience
It is really annoying, and it is an astoundingly old bug in firefox. Apparently it's very hard to fix due to annoying details of the firefox architecture.
It would be simplest for everyone if haskell.org was prepared to send out the files as text/plain (even though this is the wrong mime type), as I believe it used to do. ...
Yes, it does appear to be a bug in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=57342 not to attempt to display text/x-haskell as if it were text/plain, but to get really obsessive I'm not convinced text/plain is strictly speaking the 'wrong' media-type if that's what the user-agent requests. For example, my FireFox 1.5.0.5 says to the server it will Accept these media-types text/xml, application/xml, application/xhtml+xml, text/html; q=0.9, text/plain; q=0.8, image/png,*/*; q=0.5 This is in order of what it would most like to get back from the server. The server then goes off and tries to find the best media-type for my browser - it can supply different ones depending on what the browser says it wants. By returning it as text/x-haskell the server has given the resource to my browser in */* which is the least wanted media-type. This is perfectly correct behaviour, but if the server was also capable of providing the same thing as text/plain it would be better to give this, or even better a pretty coloured text/html one if the server had one available. I think the underlying file returned as text/x-haskell or text/plain can be the exact same file assuming all x-haskell are also plain. Could be wrong, but that's my understanding of content negotiation. Richard.