tor 2002-04-18 klockan 11.32 skrev Keith Wansbrough: > > These MIME types has now been added to the GNOME MIME database: > > > > text/x-haskell for *.hs > > text/x-literate-haskell for *.lhs > > Note the following thread from August 1999: application/x-haskell has > already been proposed and used. > > http://www.dcs.gla.ac.uk/mail-www/haskell/msg01843.html > http://www.dcs.gla.ac.uk/mail-www/haskell/msg01849.html > http://www.dcs.gla.ac.uk/mail-www/haskell/msg01853.html
I am aware of that discussion, but I chose text/* anyway. > "application" seems more appropriate for Fritz Ruehr's goal here, > which is a script that can be clicked on to make it run (using > runhugs, presumably). I can see your reasoning for "text", though. > What is used for Javascript code at present? Or for C source code? I've seen both text/javascript and application/x-javascript being used. GNOME has text/x-c for c code. Generally it has text for all program code in text format. RFC 2045 says: In general, the top-level media type is used to declare the general type of data, while the subtype specifies a specific format for that type of data. Thus, a media type of "image/xyz" is enough to tell a user agent that the data is an image, even if the user agent has no knowledge of the specific image format "xyz". Such information can be used, for example, to decide whether or not to show a user the raw data from an unrecognized subtype -- such an action might be reasonable for unrecognized subtypes of text, but not for unrecognized subtypes of image or audio. [...] Having application/x-haskell as the MIME type means that anyone that hasn't set up a viewer for that MIME type will not see it as text in the browser. So using text/ is a good way of specifying that the fallback of just showing the contents as text is perfectly OK. Even better maybe would be to have source/haskell, but introducing a completely new top-level media type is a bit heavy. Regards, Martin -- Martin Norbäck [EMAIL PROTECTED] Kapplandsgatan 40 +46 (0)708 26 33 60 S-414 78 GÖTEBORG http://www.dtek.chalmers.se/~d95mback/ SWEDEN OpenPGP ID: 3FA8580B
signature.asc
Description: PGP signature