This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-server".
The branch, master has been updated
via dde133b6dfe0af305c50c905e33d553594e02977 (commit)
from b29cb45f59e596f08f1f5eb1154af539732a8a25 (commit)
Summary of changes:
src/Snap/Internal/Http/Server.hs | 81 +++++++++++++++++++------------------
1 files changed, 42 insertions(+), 39 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dde133b6dfe0af305c50c905e33d553594e02977
Author: Gregory Collins <[email protected]>
Date: Sun May 23 12:39:42 2010 -0400
More SCCs
diff --git a/src/Snap/Internal/Http/Server.hs b/src/Snap/Internal/Http/Server.hs
index f740ff7..d8399c2 100644
--- a/src/Snap/Internal/Http/Server.hs
+++ b/src/Snap/Internal/Http/Server.hs
@@ -320,7 +320,7 @@ httpSession writeEnd onSendFile handler = do
------------------------------------------------------------------------------
receiveRequest :: ServerMonad (Maybe Request)
receiveRequest = do
- mreq <- lift parseRequest
+ mreq <- {-# SCC "receiveRequest/parseRequest" #-} lift parseRequest
case mreq of
(Just ireq) -> do
@@ -344,6 +344,7 @@ receiveRequest = do
-- socket and close afterwards
setEnumerator :: Request -> ServerMonad ()
setEnumerator req =
+ {-# SCC "receiveRequest/setEnumerator" #-}
if isChunked
then liftIO $ writeIORef (rqBody req)
(SomeEnumerator readChunkedTransferEncoding)
@@ -373,7 +374,8 @@ receiveRequest = do
parseForm :: Request -> ServerMonad Request
- parseForm req = if doIt then getIt else return req
+ parseForm req =
+ {-# SCC "receiveRequest/parseForm" #-} if doIt then getIt else return
req
where
doIt = mbCT == Just "application/x-www-form-urlencoded"
mbCT = liftM head $ Map.lookup "content-type" (rqHeaders req)
@@ -382,7 +384,7 @@ receiveRequest = do
maximumPOSTBodySize = 10*1024*1024
getIt :: ServerMonad Request
- getIt = do
+ getIt = {-# SCC "receiveRequest/parseForm/getIt" #-} do
senum <- liftIO $ readIORef $ rqBody req
let (SomeEnumerator enum) = senum
let i = joinI $ takeNoMoreThan maximumPOSTBodySize stream2stream
@@ -394,42 +396,43 @@ receiveRequest = do
return $ req { rqParams = rqParams req `mappend` newParams }
- toRequest (IRequest method uri version kvps) = do
- localAddr <- gets _localAddress
- localPort <- gets _localPort
- remoteAddr <- gets _remoteAddr
- remotePort <- gets _remotePort
- localHostname <- gets _localHostname
-
- let (serverName, serverPort) = fromMaybe
- (localHostname, localPort)
- (liftM (parseHost . head)
- (Map.lookup "host" hdrs))
-
- -- will override in "setEnumerator"
- enum <- liftIO $ newIORef $ SomeEnumerator return
-
-
- return $ Request serverName
- serverPort
- remoteAddr
- remotePort
- localAddr
- localPort
- localHostname
- isSecure
- hdrs
- enum
- mbContentLength
- method
- version
- cookies
- snapletPath
- pathInfo
- contextPath
- uri
- queryString
- params
+ toRequest (IRequest method uri version kvps) =
+ {-# SCC "receiveRequest/toRequest" #-} do
+ localAddr <- gets _localAddress
+ localPort <- gets _localPort
+ remoteAddr <- gets _remoteAddr
+ remotePort <- gets _remotePort
+ localHostname <- gets _localHostname
+
+ let (serverName, serverPort) = fromMaybe
+ (localHostname, localPort)
+ (liftM (parseHost . head)
+ (Map.lookup "host" hdrs))
+
+ -- will override in "setEnumerator"
+ enum <- liftIO $ newIORef $ SomeEnumerator return
+
+
+ return $ Request serverName
+ serverPort
+ remoteAddr
+ remotePort
+ localAddr
+ localPort
+ localHostname
+ isSecure
+ hdrs
+ enum
+ mbContentLength
+ method
+ version
+ cookies
+ snapletPath
+ pathInfo
+ contextPath
+ uri
+ queryString
+ params
where
snapletPath = "" -- TODO: snaplets in v0.2
-----------------------------------------------------------------------
hooks/post-receive
--
snap-server
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap