warp 1.3.5.1 → 1.3.6
raw patch · 4 files changed
+12/−1 lines, 4 files
Files
- Network/Wai/Handler/Warp.hs +1/−0
- Network/Wai/Handler/Warp/Run.hs +1/−0
- Network/Wai/Handler/Warp/Settings.hs +9/−0
- warp.cabal +1/−1
Network/Wai/Handler/Warp.hs view
@@ -33,6 +33,7 @@ , settingsManager , settingsFdCacheDuration , settingsResourceTPerRequest+ , settingsBeforeMainLoop -- ** Data types , HostPreference (..) -- * Connection
Network/Wai/Handler/Warp/Run.hs view
@@ -134,6 +134,7 @@ 0 -> return Nothing _ -> Just <$> F.initialize (duration * 1000000) #endif+ settingsBeforeMainLoop set mask $ \restore -> forever $ do allowInterrupt (mkConn, addr) <- getConnLoop
Network/Wai/Handler/Warp/Settings.hs view
@@ -31,6 +31,14 @@ -- @ResourceT@. This provides more intuitive behavior for dynamic code, -- but can hinder performance in high-throughput cases. File servers can -- safely set to @False@ for increased performance. Default is @True@.+ , settingsBeforeMainLoop :: IO ()+ -- ^ Code to run after the listening socket is ready but before entering+ -- the main event loop. Useful for signaling to tests that they can start+ -- running, or to drop permissions after binding to a restricted port.+ --+ -- Default: do nothing.+ --+ -- Since 1.3.6 } -- | The default settings for the Warp server. See the individual settings for@@ -52,6 +60,7 @@ , settingsManager = Nothing , settingsFdCacheDuration = 10 , settingsResourceTPerRequest = True+ , settingsBeforeMainLoop = return () } where go :: InvalidRequest -> IO ()
warp.cabal view
@@ -1,5 +1,5 @@ Name: warp-Version: 1.3.5.1+Version: 1.3.6 Synopsis: A fast, light-weight web server for WAI applications. License: MIT License-file: LICENSE