on master help sign in
Version bump and changelog
commitbb2ba5d49543e7b08ab95628bfcfa90aad8f67ca authorpatrick brisbin <pbrisbin@gmail.com> dateTue 31 Jul 2018, 14:28 (8 years ago) parent9ffa8fd
3 files changed+10−4
wai-extra/ChangeLog.md+4 wai-extra/Network/Wai/Middleware/Timeout.hs+5−3 wai-extra/wai-extra.cabal+1−1
wai-extra/ChangeLog.md+4
@@ -1,3 +1,7 @@
1+## 3.0.24.0
2+
3+* Add timeout middleware [#702](https://github.com/yesodweb/wai/pull/702).
4+
15## 3.0.23.0
26
37* Add rewriteRoot middleware [#697](https://github.com/yesodweb/wai/pull/697).
wai-extra/Network/Wai/Middleware/Timeout.hs+5−3
@@ -1,7 +1,4 @@
11-- | Timeout requests
2−--
3−-- @since X.X.X@
4−--
52module Network.Wai.Middleware.Timeout
63 ( timeout
74 , timeoutStatus
@@ -17,14 +14,19 @@ import qualified System.Timeout as Timeout
1714-- Timeouts respond with @'status503'@. See @'timeoutStatus'@ or @'timeoutAs'@
1815-- to customize the behavior of the timed-out case.
1916--
17+-- @since 3.0.24.0@
2018timeout :: Int -> Middleware
2119timeout = timeoutStatus status503
2220
2321-- | Time out with the given @'Status'@
22+--
23+-- @since 3.0.24.0@
2424timeoutStatus :: Status -> Int -> Middleware
2525timeoutStatus status = timeoutAs $ responseLBS status [] ""
2626
2727-- | Time out with the given @'Response'@
28+--
29+-- @since 3.0.24.0@
2830timeoutAs :: Response -> Int -> Middleware
2931timeoutAs timeoutReponse seconds app req respond =
3032 maybe (respond timeoutReponse) pure
wai-extra/wai-extra.cabal+1−1
@@ -1,5 +1,5 @@
11Name: wai-extra
2−Version: 3.0.23.0
2+Version: 3.0.24.0
33Synopsis: Provides some basic WAI handlers and middleware.
44description:
55 Provides basic WAI handler and middleware functionality: