packages feed

http3 0.0.11 → 0.0.12

raw patch · 5 files changed

+23/−12 lines, 5 filesdep ~http-semanticsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: http-semantics

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for http3 +## 0.0.12++* Catching up http-semantics v0.0.1.+ ## 0.0.11  * Using http-semantics.
Network/HQ/Client.hs view
@@ -44,7 +44,7 @@  import Imports import qualified Network.HTTP3.Client as H3-import Network.HTTP3.Recv (newSource, readSource)+import Network.HTTP3.Recv (newSource, readSource')  -- | Running an HQ client. run :: Connection -> H3.ClientConfig -> H3.Config -> Client a -> IO a@@ -65,7 +65,7 @@     src <- newSource strm     refH <- newIORef Nothing     vt <- toTokenHeaderTable []-    let readB = readSource src+    let readB = readSource' src         rsp = Response $ InpObj vt Nothing readB refH     processResponse rsp   where
Network/HQ/Server.hs view
@@ -50,7 +50,7 @@  import Imports import Network.HTTP3.Config-import Network.HTTP3.Recv (newSource, readSource)+import Network.HTTP3.Recv (newSource, readSource')  -- | Running an HQ server. run :: Connection -> Config -> Server -> IO ()@@ -71,7 +71,7 @@         vt <- recvHeader strm mysa         src <- newSource strm         refH <- newIORef Nothing-        let readB = readSource src+        let readB = readSource' src             req = Request $ InpObj vt Nothing readB refH             aux = Aux th mysa peersa         server req aux $ sendResponse conf strm
Network/HTTP3/Recv.hs view
@@ -5,6 +5,7 @@     Source,     newSource,     readSource,+    readSource',     recvHeader,     recvBody, ) where@@ -35,6 +36,11 @@             writeIORef sourcePending Nothing             return x +readSource' :: Source -> IO (ByteString, Bool)+readSource' src = do+    x <- readSource src+    return $ if x == "" then (x, True) else (x, False)+ pushbackSource :: Source -> ByteString -> IO () pushbackSource _ "" = return () pushbackSource Source{..} bs = writeIORef sourcePending $ Just bs@@ -67,7 +73,7 @@     -> Source     -> IORef IFrame     -> IORef (Maybe TokenHeaderTable)-    -> IO ByteString+    -> IO (ByteString, Bool) recvBody ctx src refI refH = do     st <- readIORef refI     loop st@@ -75,7 +81,7 @@     loop st = do         bs <- readSource src         if bs == ""-            then return ""+            then return ("", True)             else case parseH3Frame st bs of                 IPay H3FrameData siz received bss -> do                     let st' = IPay H3FrameData siz received []@@ -83,22 +89,23 @@                         then loop st'                         else do                             writeIORef refI st'-                            return $ BS.concat $ reverse bss+                            let ret = BS.concat $ reverse bss+                            return (ret, False)                 IDone typ payload leftover                     | typ == H3FrameHeaders -> do                         writeIORef refI IInit                         -- pushbackSource src leftover -- fixme                         hdr <- qpackDecode ctx payload                         writeIORef refH $ Just hdr-                        return ""+                        return ("", True)                     | typ == H3FrameData -> do                         writeIORef refI IInit                         pushbackSource src leftover-                        return payload+                        return (payload, False)                     | permittedInRequestStream typ -> do                         pushbackSource src leftover                         loop IInit                     | otherwise -> do                         abort ctx H3FrameUnexpected-                        return payload -- dummy+                        return (payload, False) -- dummy                 st' -> loop st'
http3.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               http3-version:            0.0.11+version:            0.0.12 license:            BSD-3-Clause license-file:       LICENSE maintainer:         Kazu Yamamoto <kazu@iij.ad.jp>@@ -81,7 +81,7 @@         bytestring,         case-insensitive,         containers,-        http-semantics,+        http-semantics >= 0.0.1,         http-types,         http2 >=5.2 && <5.3,         network,