@@ -36,7 +36,7 @@ safeRead d s =
36lookup' :: String -> [(String, String)] -> String
36lookup' :: String -> [(String, String)] -> String
37lookup' key pairs = fromMaybe "" $ lookup key pairs
37lookup' key pairs = fromMaybe "" $ lookup key pairs
39−run :: Application () -> IO ()
39+run :: Application -> IO ()
40run app = do
40run app = do
41 vars <- getEnvironment
41 vars <- getEnvironment
42 let input = requestBodyHandle System.IO.stdin
42 let input = requestBodyHandle System.IO.stdin
@@ -44,7 +44,7 @@ run app = do
44 run'' vars input output Nothing app
44 run'' vars input output Nothing app
46runSendfile :: B.ByteString -- ^ sendfile header
46runSendfile :: B.ByteString -- ^ sendfile header
47− -> Application () -> IO ()
47+ -> Application -> IO ()
48runSendfile sf app = do
48runSendfile sf app = do
49 vars <- getEnvironment
49 vars <- getEnvironment
50 let input = requestBodyHandle System.IO.stdin
50 let input = requestBodyHandle System.IO.stdin
@@ -54,7 +54,7 @@ runSendfile sf app = do
54run' :: [(String, String)] -- ^ all variables
54run' :: [(String, String)] -- ^ all variables
55 -> System.IO.Handle -- ^ responseBody of input
55 -> System.IO.Handle -- ^ responseBody of input
56 -> System.IO.Handle -- ^ destination for output
56 -> System.IO.Handle -- ^ destination for output
57− -> Application ()
57+ -> Application
59run' vars inputH outputH app = do
59run' vars inputH outputH app = do
60 let input = requestBodyHandle inputH
60 let input = requestBodyHandle inputH
@@ -65,7 +65,7 @@ run'' :: [(String, String)] -- ^ all variables
65 -> (forall a. Int -> Enumerator B.ByteString IO a) -- ^ responseBody of input
65 -> (forall a. Int -> Enumerator B.ByteString IO a) -- ^ responseBody of input
66 -> (B.ByteString -> IO ()) -- ^ destination for output FIXME use an iteratee
66 -> (B.ByteString -> IO ()) -- ^ destination for output FIXME use an iteratee
67 -> Maybe B.ByteString -- ^ does the server support the X-Sendfile header?
67 -> Maybe B.ByteString -- ^ does the server support the X-Sendfile header?
68− -> Application ()
68+ -> Application
70run'' vars inputH outputH xsendfile app = do
70run'' vars inputH outputH xsendfile app = do
71 let rmethod = B.pack $ lookup' "REQUEST_METHOD" vars
71 let rmethod = B.pack $ lookup' "REQUEST_METHOD" vars