ndmitchell / hoogle

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

WIP: Fix file links on *nix #172

Closed chreekat closed 8 years ago

chreekat commented 8 years ago

NB: I have a feeling this is the wrong total solution, since I suspect it will break Windows paths.

What this does accomplish is make file urls work when running the server in 'local' mode. (On Linux.) Without this patch, all /file/... routes returned 'File not found'.

ndmitchell commented 8 years ago

Actually, I think Windows may be somewhat flexible to a leading / on file links. I'll have to check later tonight.

ndmitchell commented 8 years ago

Windows definitely isn't flexible in this regard (it is when going via a web browser, but not when going via the file API, which is what confused me). I've added in what basically amounts to a hack, but should work for everyone.

chreekat commented 8 years ago

Nice. :) This works for me.