packages feed

mongrel2-handler 0.3.1 → 0.3.2

raw patch · 2 files changed

+12/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Mongrel2: simpleReply :: ConnectedHandler -> Connection -> Builder -> IO ()

Files

mongrel2-handler.cabal view
@@ -1,5 +1,5 @@ Name:                mongrel2-handler-Version:             0.3.1+Version:             0.3.2 Synopsis:            Mongrel2 Handler Library Description:         Mongrel2 Handler Library. 
src/Mongrel2.hs view
@@ -5,6 +5,7 @@        , withConnectedHandler        , receiveRequest        , sendReply+       , simpleReply        -- Re-exported        , buildResponse        , ClientID@@ -68,6 +69,16 @@         Right m -> do           -- Return the parsed message.           return m++-- | Simplied form of @sendReply@ function. This variant sends a reply+-- to the requesting client with no option of sending replies to other+-- clients.+simpleReply :: ConnectedHandler -> Connection -> Builder -> IO ()+simpleReply handler connection =+  sendReply handler serverUUID [clientID]+  where+    serverUUID = connServerUUID connection+    clientID = connClientID connection  -- | Send a reply to the Mongrel2 server. sendReply :: ConnectedHandler -> UUID -> [ClientID] -> Builder -> IO ()