[Haskell-cafe] viewing HS files in Firefox
r.kelsall at millstream.com
Sun Oct 28 15:45:21 EDT 2007
Shachaf Ben-Kiki wrote:
> Richard Kelsall wrote:
>> Thomas Schilling wrote:
>>> On Sat, 2007-10-27 at 18:48 -0400, 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
>>> I believe those kinds of problem have to do with the MIME-encoding on
>>> the server side: The server uses text/x-haskell. For Firefox to
>>> display the document inline it probably has to be text/plain. Not sure
>>> what the proper fix is, though.
>> It should probably be fixed in one of the Apache config files. In the
>> HTTP headers from darcs.haskell.org (viewed with the Live HTTP headers
>> extension in FireFox) I'm getting
> Fixed? It's already fixed. text/x-haskell is the right Content-Type to
> send; this is Haskell after all, not just plaintext. It's your
> browser's responsibility to display it any way it likes. People have
> had this discussion in #xmonad, and it seems that MIME edit
> (<https://addons.mozilla.org/en-US/firefox/addon/4498>) is a workable
> solution (I don't use it myself, though). Of course, Sterling Clover's
> suggestion (Open in Browser) would also work well.
Hello Shachaf, I hope you intended this for the list, as I haven't
seen it come through, if not my apologies for posting it.
Ah, yes I see what you mean, text/x-haskell is the best media-type,
however I think it ought to be possible to use 'content negotiation'
with more than one representation to supply the same file as text/plain
to non-Haskell-capable browsers. I haven't actually done this though
so can't be certain of it or provide configuration details. If somebody
really wanted to get clever with it it could also supply pretty
coloured Haskell for a text/html representation.
Sorry, I couldn't find the #xmonad discussion, is this published
More information about the Haskell-Cafe