summaryrefslogtreecommitdiff
path: root/Utility/WebApp.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-06-04 14:37:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-06-04 14:37:08 -0400
commitb9c4df50e0b9103352312bd0cb1d5eaad311a36d (patch)
treeb082ef2d12fdfc587bd3523a74ed0366e4f16a56 /Utility/WebApp.hs
parent58deacd7af6ce01c8d4bb6e630c6c2547e480d04 (diff)
fix build with old versions of warp
Diffstat (limited to 'Utility/WebApp.hs')
-rw-r--r--Utility/WebApp.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs
index 1db7fcf25..6af324e51 100644
--- a/Utility/WebApp.hs
+++ b/Utility/WebApp.hs
@@ -97,7 +97,14 @@ fixSockAddr addr = addr
-- disable buggy sloworis attack prevention code
webAppSettings :: Settings
-webAppSettings = setTimeout (30 * 60) defaultSettings
+
+#if MIN_VERSION_warp(2,1,0)
+webAppSettings = setTimeout halfhour defaultSettings
+#else
+webAppSettings = defaultSettings { settingsTimeout = halfhour }
+#endif
+ where
+ halfhour = 30 * 60
{- Binds to a local socket, or if specified, to a socket on the specified
- hostname or address. Selects any free port, unless the hostname ends with