9. ちょっと危険なpatchをあてます
ローカルのファイル群が全部CGI経由で読め
ちゃう。危険!
$ git diff
diff --git a/src/Web/All.hs b/src/Web/All.hs
index 97295bf..d9755d1 100644
--- a/src/Web/All.hs
+++ b/src/Web/All.hs
@@ -24,7 +24,7 @@ action q = do
where
go t d p | "/res/" `isPrefixOf` p =
serveFile True $ d </> "resources" </> takeFileName p
- go t d p | "/file/usr/share/doc/" `isPrefixOf` p =
+ go t d p | "/file/" `isPrefixOf` p =
let p' = if "/" `isSuffixOf` p then p ++ "index.html"
else p
in rewriteRootLinks =<< serveFile False (fromJust
(stripPrefix "/file" p'))
go t _ _ = rewriteRootLinks =<< response responseArgs
{templates=t} q
10. Hoogleをビルドしまっしょ
$ pwd
/home/kiwamu/src/hoogle
$ cabal install
--snip--
$ ls ~/.cabal/bin/hoogle
/home/kiwamu/.cabal/bin/hoogle*
$ ls ~/.cabal/share/hoogle-4.2.13
resources/
その後テンプレートをCGI対応させましょう。
$ ./misc/template-for-cgi