packages feed

warp 3.0.0.1 → 3.0.0.2

raw patch · 3 files changed

+29/−2 lines, 3 files

Files

Network/Wai/Handler/Warp/Conduit.hs view
@@ -161,7 +161,13 @@                 let w =                         S.foldl' (\i c -> i * 16 + fromIntegral (hexToWord c)) 0                         $ S.takeWhile isHexDigit x-                withLen w $ S.drop 1 y++                let y' = S.drop 1 y+                y'' <-+                    if S.null y'+                        then readSource src+                        else return y'+                withLen w y''      hexToWord w         | w < 58 = w - 48
test/ConduitSpec.hs view
@@ -44,3 +44,24 @@          y <- replicateM 15 $ readSource src         S.concat y `shouldBe` "BLAH"+    it "chunk boundaries" $ do+        ref <- newIORef+            [ "5\r\n"+            , "12345\r\n3\r"+            , "\n678\r\n0\r\n"+            , "\r\nBLAH"+            ]+        src <- mkSource $ do+            x <- readIORef ref+            case x of+                [] -> return S.empty+                y:z -> do+                    writeIORef ref z+                    return y+        csrc <- mkCSource src++        x <- replicateM 15 $ readCSource csrc+        S.concat x `shouldBe` "12345678"++        y <- replicateM 15 $ readSource src+        S.concat y `shouldBe` "BLAH"
warp.cabal view
@@ -1,5 +1,5 @@ Name:                warp-Version:             3.0.0.1+Version:             3.0.0.2 Synopsis:            A fast, light-weight web server for WAI applications. License:             MIT License-file:        LICENSE