@@ -30,7 +30,7 @@ testRange range out crange = it title $ withApp defaultSettings app $ \port -> d
30 S.hPutStr handle "Range: bytes="
30 S.hPutStr handle "Range: bytes="
31 S.hPutStr handle range
31 S.hPutStr handle range
32 S.hPutStr handle "\r\n\r\n"
32 S.hPutStr handle "\r\n\r\n"
33− bss <- fmap (lines . filter (/= '\r') . S8.unpack) $ S.hGetContents handle
33+ bss <- fmap (lines . filter (/= '\r') . S8.unpack) $ S.hGetSome handle 1024
34 hClose handle
34 hClose handle
35 out `shouldBe` last bss
35 out `shouldBe` last bss
36 let hs = mapMaybe toHeader bss
36 let hs = mapMaybe toHeader bss
@@ -51,7 +51,7 @@ testPartial :: Integer -- ^ offset
51testPartial offset count out = it title $ withApp defaultSettings app $ \port -> do
51testPartial offset count out = it title $ withApp defaultSettings app $ \port -> do
52 handle <- connectTo "127.0.0.1" $ PortNumber $ fromIntegral port
52 handle <- connectTo "127.0.0.1" $ PortNumber $ fromIntegral port
53 S.hPutStr handle "GET / HTTP/1.0\r\n\r\n"
53 S.hPutStr handle "GET / HTTP/1.0\r\n\r\n"
54− bss <- fmap (lines . filter (/= '\r') . S8.unpack) $ S.hGetContents handle
54+ bss <- fmap (lines . filter (/= '\r') . S8.unpack) $ S.hGetSome handle 1024
55 hClose handle
55 hClose handle
56 out `shouldBe` last bss
56 out `shouldBe` last bss
57 let hs = mapMaybe toHeader bss
57 let hs = mapMaybe toHeader bss