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-core".
The branch, master has been updated
via 0a293ae9e681ae5dcb179839a929a1e816b910c5 (commit)
from cdb3f05214a415e32b0fb38ae14097908cfe3db9 (commit)
Summary of changes:
src/Snap/Internal/Iteratee/Debug.hs | 6 +++++-
src/Snap/Internal/Types.hs | 5 ++++-
2 files changed, 9 insertions(+), 2 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 0a293ae9e681ae5dcb179839a929a1e816b910c5
Author: Gregory Collins <[email protected]>
Date: Fri Sep 3 12:22:08 2010 -0400
Change return type of unsafeDetachRequestBody
diff --git a/src/Snap/Internal/Iteratee/Debug.hs
b/src/Snap/Internal/Iteratee/Debug.hs
index 759bc0f..c2c6981 100644
--- a/src/Snap/Internal/Iteratee/Debug.hs
+++ b/src/Snap/Internal/Iteratee/Debug.hs
@@ -48,10 +48,14 @@ debugIteratee = IterateeG f
iterateeDebugWrapper :: String -> Iteratee IO a -> Iteratee IO a
iterateeDebugWrapper name iter = IterateeG f
where
- f c@(EOF _) = do
+ f c@(EOF Nothing) = do
debug $ name ++ ": got EOF: " ++ show c
runIter iter c
+ f c@(EOF (Just e)) = do
+ debug $ name ++ ": got EOF **error**: " ++ show c
+ runIter iter c
+
f c@(Chunk _) = do
debug $ name ++ ": got chunk: " ++ show c
wrapResult $ runIter iter c
diff --git a/src/Snap/Internal/Types.hs b/src/Snap/Internal/Types.hs
index 4b6433b..4c21092 100644
--- a/src/Snap/Internal/Types.hs
+++ b/src/Snap/Internal/Types.hs
@@ -27,6 +27,7 @@ import Data.Typeable
------------------------------------------------------------------------------
import Snap.Iteratee hiding (Enumerator)
import Snap.Internal.Http.Types
+import Snap.Internal.Iteratee.Debug
------------------------------------------------------------------------------
@@ -215,9 +216,11 @@ unsafeDetachRequestBody = do
req <- getRequest
let ioref = rqBody req
senum <- liftIO $ readIORef ioref
+ let (SomeEnumerator enum) = senum
liftIO $ writeIORef ioref
(SomeEnumerator $ return . Iter.joinI . Iter.take 0)
- return senum
+ return $ SomeEnumerator
+ $ \i -> enum (iterateeDebugWrapper "unsafeDetachRequestBody" i)
------------------------------------------------------------------------------
-----------------------------------------------------------------------
hooks/post-receive
--
snap-core
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap