git.iko.soy/typeable/pandoc
on master help sign in
trypandoc: add 2 second timeout.
commit7e83686d31bd1ebf627b843eff6210a636e6f719 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 28 Feb 2021, 09:24 (6 years ago) parent2faa57e
2 files changed+3−2
pandoc.cabal+1−1 trypandoc/trypandoc.hs+2−1
pandoc.cabal+1−1
@@ -723,7 +723,7 @@ executable trypandoc
723723 main-is: trypandoc.hs
724724 hs-source-dirs: trypandoc
725725 if flag(trypandoc)
726− build-depends: aeson, http-types, wai >= 0.3, wai-extra
726+ build-depends: aeson, http-types, wai >= 0.3, wai-extra >= 3.0.24
727727 buildable: True
728728 else
729729 buildable: False
trypandoc/trypandoc.hs+2−1
@@ -12,6 +12,7 @@ Provides a webservice which allows to try pandoc in the browser.
1212-}
1313module Main where
1414import Network.Wai.Handler.CGI
15+import Network.Wai.Middleware.Timeout (timeout)
1516import Network.Wai
1617import Control.Applicative ((<$>))
1718import Data.Maybe (fromMaybe)
@@ -29,7 +30,7 @@ import qualified Data.Text as T
2930import Data.Text (Text)
3031
3132main :: IO ()
32−main = run app
33+main = run $ timeout 2 app
3334
3435app :: Application
3536app req respond = do