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  f6ba94ca72f70cbd16586c8f2509fcec69618d1a (commit)
      from  b3ebefc8d2609bcaa1be9613ab63c26fe1810ed1 (commit)


Summary of changes:
 test/common/Test/Common/TestHandler.hs |    8 ++++----
 1 files changed, 4 insertions(+), 4 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 f6ba94ca72f70cbd16586c8f2509fcec69618d1a
Author: Gregory Collins <[email protected]>
Date:   Tue Sep 21 15:16:03 2010 -0400

    Testsuite: force some short writes in the libev backend by building bigger 
chunks in the bigresponse handler

diff --git a/test/common/Test/Common/TestHandler.hs 
b/test/common/Test/Common/TestHandler.hs
index 8707eb7..7719dde 100644
--- a/test/common/Test/Common/TestHandler.hs
+++ b/test/common/Test/Common/TestHandler.hs
@@ -6,7 +6,7 @@ module Test.Common.TestHandler (testHandler) where
 
 import           Control.Monad
 
-import qualified Data.ByteString.Char8 as B
+import qualified Data.ByteString.Char8 as S
 import qualified Data.ByteString.Lazy.Char8 as L
 import           Data.Iteratee.WrappedByteString
 import           Data.Maybe
@@ -48,16 +48,16 @@ rot13Handler = transformRequestBody $ return . f
 bigResponseHandler :: Snap ()
 bigResponseHandler = do
     let sz = 4000000
-    let s = L.take sz $ L.cycle $ L.replicate 4096 '.'
+    let s = L.take sz $ L.cycle $ L.fromChunks [S.replicate 400000 '.']
     modifyResponse $ setContentLength sz
     writeLBS s
 
 
 responseHandler :: Snap ()
 responseHandler = do
-    !code <- liftM (read . B.unpack . fromMaybe "503") $ getParam "code"
+    !code <- liftM (read . S.unpack . fromMaybe "503") $ getParam "code"
     modifyResponse $ setResponseCode code
-    writeBS $ B.pack $ show code
+    writeBS $ S.pack $ show code
 
 
 testHandler :: Snap ()
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap-server
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to