ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
738 stars 134 forks source link

Hoogle Server: send Content-Type header with responses #200

Closed achudnov closed 7 years ago

achudnov commented 7 years ago

Hoogle server is not sending a Content-Type header with its HTTP responses, though it does include a meta http-equiv tag with the content type. The Content-Type header is required in responses that have a body. The practical implication of not having this header is that certain(*) text browsers refuse to render the page.

I haven't looked at the code base yet, but I am fairly confident the fix is going to be trivial, and I can't see a reason not to have this. I can go ahead and implement it and submit a PR, if there are no objections.

Hoogle version tested: 5.0.1

(*) That's w3m and eww --- all the browsers I've tested so far.

ndmitchell commented 7 years ago

Thanks for spotting that. It should be trivial to fix - PR welcome. You should also be able to remove http-equiv. I think in many versions of Hoogle past I did that because the web frameworks a really long time ago didn't make it easy.