blaze-builder 0.2.1.3 → 0.2.1.4
raw patch · 3 files changed
+19/−6 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Blaze/ByteString/Builder/HTTP.hs +13/−5
- CHANGES +5/−0
- blaze-builder.cabal +1/−1
Blaze/ByteString/Builder/HTTP.hs view
@@ -111,6 +111,11 @@ where oneLine x = fromWriteSingleton writeWord32Hex x `mappend` Char8.fromChar ' '++test = print $ toLazyByteString+ $ chunkedTransferEncoding body `mappend` chunkedTransferTerminator++body = copyByteString "maa" `mappend` copyByteString "foo" `mappend` copyByteString "bar" -} ------------------------------------------------------------------------------@@ -122,9 +127,10 @@ chunkedTransferEncoding (Builder b) = fromBuildStepCont transferEncodingStep where- transferEncodingStep k = go (b (buildStep k))+ finalStep !(BufRange op _) = return $ Done op ()++ transferEncodingStep k = go (b (buildStep finalStep)) where- go :: BuildStep a -> BufRange -> IO (BuildSignal a) go innerStep !(BufRange op ope) -- FIXME: Assert that outRemaining < maxBound :: Word32 | outRemaining < minimalBufferSize = @@ -152,9 +158,10 @@ -- execute inner builder with reduced boundaries signal <- runBuildStep innerStep brInner case signal of- Done opInner' x ->- wrapChunk opInner' $ \op' -> - return $! done op' x+ Done opInner' _ ->+ wrapChunk opInner' $ \op' -> do+ let !br' = BufRange op' ope+ k br' BufferFull minRequiredSize opInner' nextInnerStep -> wrapChunk opInner' $ \op' ->@@ -208,4 +215,5 @@ -- | The zero-length chunk '0\r\n\r\n' signaling the termination of the data transfer. chunkedTransferTerminator :: Builder chunkedTransferTerminator = copyByteString "0\r\n\r\n"+
CHANGES view
@@ -1,3 +1,8 @@+* 0.2.1.4 + + - Fixed bug: appending to 'chunkedTransferEncoding somebuilder' also encoded+ the appended builder, which is obviously wrong.+ * 0.2.1.3 - Fixed bug: 'chunkedTransferTerminator' is now correctly set to "0\r\n\r\n".
blaze-builder.cabal view
@@ -1,5 +1,5 @@ Name: blaze-builder-Version: 0.2.1.3+Version: 0.2.1.4 Synopsis: Efficient buffered output. Description: