Skip to content
This repository
Newer
Older
100755 29 lines (23 sloc) 0.842 kb
daaafffe »
2008-11-15 Initial commit
1 module Turbinado.Environment.Response (
2 HTTP.Response,
3 setResponse,
4 isResponseComplete
5 )where
6
7 import qualified Network.HTTP as HTTP
8 import Network.URI
9 import Turbinado.Utility.General
10 import qualified Data.Map as M
11 import Control.Monad
c59c8d30 »
2008-11-24 Checking in all of the Environment + Website changes
12 import Control.Monad.State
daaafffe »
2008-11-15 Initial commit
13 import Data.Maybe
c59c8d30 »
2008-11-24 Checking in all of the Environment + Website changes
14 import Turbinado.Environment.Types
daaafffe »
2008-11-15 Initial commit
15 import System.Time
16 import System.Locale
17
18
727bbd28 »
2009-06-09 Syncing with website
19 setResponse :: (HasEnvironment m) => HTTP.Response String -> m ()
1e33cd06 »
2008-12-26 Switching to HasEnvironment class; adding 'Components'; improving the…
20 setResponse resp = do e <- getEnvironment
21 setEnvironment $ e {getResponse = Just resp}
daaafffe »
2008-11-15 Initial commit
22
2a93e469 »
2009-06-13 Adding FastCGI support
23 isResponseComplete :: (HasEnvironment m) => m Bool
24 isResponseComplete = do e <- getEnvironment
25 case (getResponse e) of
26 Nothing -> return False
27 Just r' -> return (HTTP.rspCode r' /= (0,0,0))
daaafffe »
2008-11-15 Initial commit
28
Something went wrong with that request. Please try again.