Closed achudnov closed 7 years ago
Thanks for the patch! I deleted OutputString and added in OutputText which sends things up with text/plain
- now there is always a content-type specified.
Thanks, Neil. Would you, please, comment here (or @-mention me somewhere else) when this fix is out on Hackage/Stackage?
It's already deployed at http://hoogle.haskell.org/. Generally Stackage upgrades relatively rarely - if it makes a particular difference I can make a release and suggest they take it sooner.
I meant the actual package. I run hoogle
locally. It's not urgent: I've installed it from HEAD
manually.
I've just released hoogle-5.0.7 which has the fix it in - always happy to make a release if it's of benefit to someone.
Thank you!
Fixes #200.
It looks like the code in
Action.Server
has bit-rotten and it wasn't using the correct types for output. It was using a plainOutputString
whereasOutputHTML
would have been more appropriate at it causes the web server to send the appropriateContent-Type
. I've changed those, which fixed the issue with text-browsers that I was seeing.I didn't touch the
OutputString
in the stats handler as I was not sure about the intended semantics of the output. It might be worth checking it and also searching for other occurrences ofOutputString
and checking if a more specific constructor (e.g. OutputHTML or OutputJSON) would be more appropriate.