packages feed

mighttpd2 2.5.8 → 2.5.9

raw patch · 3 files changed

+16/−5 lines, 3 files

Files

FileCGIApp.hs view
@@ -40,6 +40,7 @@ getBlock :: ByteString -> RouteDB -> Maybe [Route] getBlock _ [] = Nothing getBlock key (Block doms maps : ms)+  | "*" `elem` doms = Just maps   | key `elem` doms = Just maps   | otherwise       = getBlock key ms 
Mighty.hs view
@@ -27,12 +27,18 @@ import System.Posix import Types +errorFile :: FilePath+errorFile = "/tmp/mighty_error"+ main :: IO () main = do     (opt,route) <- getOptRoute     if opt_debug_mode opt then         server opt route-      else+      else do+        putStrLn "Detaching this terminal..."+        putStrLn $ "If any, errors can be found in \"" ++ errorFile ++ "\""+        hFlush stdout         daemonize $ server opt route   where     getOptRoute = getArgs >>= eachCase@@ -45,7 +51,7 @@                         defaultOption           dir <- getCurrentDirectory           let dst = fromString . addTrailingPathSeparator $ dir-              route = [Block ["localhost"] [RouteFile "/" dst]]+              route = [Block ["*"] [RouteFile "/" dst]]           return (opt, route)       | n == 2 = do           opt   <- parseOption $ args !! 0@@ -63,7 +69,11 @@ server :: Option -> RouteDB -> IO () server opt route = handle handler $ do     s <- sOpen-    unless debug writePidFile+    if debug then do+        putStrLn $ "Serving on port " ++ show port ++ "."+        hFlush stdout+      else+        writePidFile     setGroupUser opt     logCheck logtype     if workers == 1 then do@@ -86,7 +96,7 @@     handler :: SomeException -> IO ()     handler e       | debug = hPrint stderr e-      | otherwise = writeFile "/tmp/mighty_error" (show e)+      | otherwise = writeFile errorFile (show e)     logspec = FileLogSpec {         log_file          = opt_log_file opt       , log_file_size     = fromIntegral $ opt_log_file_size opt
mighttpd2.cabal view
@@ -1,5 +1,5 @@ Name:                   mighttpd2-Version:                2.5.8+Version:                2.5.9 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3