packages feed

http3 0.0.12 → 0.0.13

raw patch · 4 files changed

+22/−9 lines, 4 filesdep ~http-semanticsdep ~http2PVP ok

version bump matches the API change (PVP)

Dependency ranges changed: http-semantics, http2

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Revision history for http3 +## 0.0.13++* Using OutBodyIface.+  [#5](https://github.com/kazu-yamamoto/http3/pull/5)+ ## 0.0.12  * Catching up http-semantics v0.0.1.
Network/HQ/Server.hs view
@@ -126,7 +126,7 @@ sendNext :: Stream -> DynaNext -> IO () sendNext strm action = do     fp <- BS.mallocByteString 2048-    Next len _reqflush mnext <- withForeignPtr fp $ \buf -> action buf 2048 65536 -- window size+    Next len _reqflush mnext <- withForeignPtr fp $ \buf -> action buf 2048     if len == 0         then return ()         else do
Network/HTTP3/Send.hs view
@@ -6,7 +6,6 @@     sendBody, ) where -import Data.ByteString.Builder (Builder) import qualified Data.ByteString.Builder.Extra as B import qualified Data.ByteString.Internal as BS import Data.IORef@@ -53,7 +52,8 @@             strm             th             tlrmkr-            (\unmask push flush -> unmask $ strmbdy push flush)+            ( \iface -> outBodyUnmask iface $ strmbdy (outBodyPush iface) (outBodyFlush iface)+            )     OutBodyStreamingUnmask strmbdy -> sendStreaming ctx strm th tlrmkr strmbdy   where     tlrmkr = outObjTrailers outobj@@ -73,7 +73,7 @@     :: TrailersMaker -> DynaNext -> IO (ByteString, Maybe DynaNext, TrailersMaker) newByteStringWith tlrmkr0 action = do     fp <- BS.mallocByteString 2048-    Next len _reqflush mnext1 <- withForeignPtr fp $ \buf -> action buf 2048 65536 -- window size+    Next len _reqflush mnext1 <- withForeignPtr fp $ \buf -> action buf 2048     if len == 0         then return ("", Nothing, tlrmkr0)         else do@@ -104,11 +104,19 @@     -> Stream     -> T.Handle     -> TrailersMaker-    -> ((forall x. IO x -> IO x) -> (Builder -> IO ()) -> IO () -> IO ())+    -> (OutBodyIface -> IO ())     -> IO () sendStreaming ctx strm th tlrmkr0 strmbdy = do     ref <- newIORef tlrmkr0-    E.mask $ \unmask -> strmbdy unmask (write ref) flush+    E.mask $ \unmask -> do+        let iface =+                OutBodyIface+                    { outBodyUnmask = unmask+                    , outBodyPush = write ref+                    , outBodyPushFinal = write ref -- fixme+                    , outBodyFlush = flush+                    }+        strmbdy iface     tlrmkr <- readIORef ref     Trailers trailers <- tlrmkr Nothing     unless (null trailers) $ sendHeader ctx strm th trailers
http3.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               http3-version:            0.0.12+version:            0.0.13 license:            BSD-3-Clause license-file:       LICENSE maintainer:         Kazu Yamamoto <kazu@iij.ad.jp>@@ -81,9 +81,9 @@         bytestring,         case-insensitive,         containers,-        http-semantics >= 0.0.1,+        http-semantics >= 0.1 && <0.2,         http-types,-        http2 >=5.2 && <5.3,+        http2 >=5.2.3 && <5.3,         network,         network-byte-order,         quic >= 0.1.20 && < 0.2,