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, iteratee-fixes has been created
        at  975685be5baa5c5d387a8d1e82a3cba41219f19c (commit)

- Log -----------------------------------------------------------------
commit 975685be5baa5c5d387a8d1e82a3cba41219f19c
Author: Gregory Collins <[email protected]>
Date:   Fri Sep 3 12:22:08 2010 -0400

    checkpoint

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

Reply via email to