aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pandoc.cabal2
-rw-r--r--trypandoc/trypandoc.hs3
2 files changed, 3 insertions, 2 deletions
diff --git a/pandoc.cabal b/pandoc.cabal
index 567b650a1..61b1de0dd 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -723,7 +723,7 @@ executable trypandoc
main-is: trypandoc.hs
hs-source-dirs: trypandoc
if flag(trypandoc)
- build-depends: aeson, http-types, wai >= 0.3, wai-extra
+ build-depends: aeson, http-types, wai >= 0.3, wai-extra >= 3.0.24
buildable: True
else
buildable: False
diff --git a/trypandoc/trypandoc.hs b/trypandoc/trypandoc.hs
index 810752afa..385fcfe55 100644
--- a/trypandoc/trypandoc.hs
+++ b/trypandoc/trypandoc.hs
@@ -12,6 +12,7 @@ Provides a webservice which allows to try pandoc in the browser.
-}
module Main where
import Network.Wai.Handler.CGI
+import Network.Wai.Middleware.Timeout (timeout)
import Network.Wai
import Control.Applicative ((<$>))
import Data.Maybe (fromMaybe)
@@ -29,7 +30,7 @@ import qualified Data.Text as T
import Data.Text (Text)
main :: IO ()
-main = run app
+main = run $ timeout 2 app
app :: Application
app req respond = do