@@ -28,7 +28,7 @@ run app = do
28 run' vars System.IO.stdin System.IO.stdout app
28 run' vars System.IO.stdin System.IO.stdout app
30run' :: [(String, String)] -- ^ all variables
30run' :: [(String, String)] -- ^ all variables
31− -> System.IO.Handle -- ^ body of input
31+ -> System.IO.Handle -- ^ responseBody of input
32 -> System.IO.Handle -- ^ destination for output
32 -> System.IO.Handle -- ^ destination for output
33 -> Application
33 -> Application
@@ -51,7 +51,7 @@ run' vars inputH outputH app = do
51 , queryString = B.pack qstring
51 , queryString = B.pack qstring
52 , serverName = B.pack servername
52 , serverName = B.pack servername
53 , serverPort = serverport
53 , serverPort = serverport
54− , httpHeaders = map (cleanupVarName *** B.pack) vars
54+ , requestHeaders = map (cleanupVarName *** B.pack) vars
55 , urlScheme = urlScheme'
55 , urlScheme = urlScheme'
56 , requestBody = requestBodyHandle inputH mContentLength
56 , requestBody = requestBodyHandle inputH mContentLength
57 , errorHandler = System.IO.hPutStr System.IO.stderr
57 , errorHandler = System.IO.hPutStr System.IO.stderr
@@ -59,7 +59,7 @@ run' vars inputH outputH app = do
59 , httpVersion = HttpVersion B.empty
59 , httpVersion = HttpVersion B.empty
61 res <- app env
61 res <- app env
62− let h = headers res
62+ let h = responseHeaders res
63 let h' = case lookup ContentType h of
63 let h' = case lookup ContentType h of
64 Nothing -> (ContentType, B.pack "text/html; charset=utf-8")
64 Nothing -> (ContentType, B.pack "text/html; charset=utf-8")
@@ -70,7 +70,7 @@ run' vars inputH outputH app = do
70 hPut $ B.singleton '\n'
70 hPut $ B.singleton '\n'
71 mapM_ (printHeader hPut) h'
71 mapM_ (printHeader hPut) h'
72 hPut $ B.singleton '\n'
72 hPut $ B.singleton '\n'
73− _ <- fromEitherFile (body res) (myPut outputH) ()
73+ _ <- fromEitherFile (responseBody res) (myPut outputH) ()
76myPut :: System.IO.Handle -> () -> B.ByteString -> IO (Either () ())
76myPut :: System.IO.Handle -> () -> B.ByteString -> IO (Either () ())