packages feed

http3 0.0.22 → 0.0.23

raw patch · 12 files changed

+32/−21 lines, 12 filesdep +utf8-stringdep ~iproutedep ~quicPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: utf8-string

Dependency ranges changed: iproute, quic

API changes (from Hackage documentation)

- Network.HQ.Client: data () => Request
+ Network.HQ.Client: data Request
- Network.HQ.Client: data () => Response
+ Network.HQ.Client: data Response
- Network.HQ.Server: data () => Request
+ Network.HQ.Server: data Request
- Network.HQ.Server: data () => Response
+ Network.HQ.Server: data Response
- Network.HTTP3.Internal: data () => ApplicationProtocolError
+ Network.HTTP3.Internal: data ApplicationProtocolError
- Network.HTTP3.Server: data () => ServerIO a
+ Network.HTTP3.Server: data ServerIO a
- Network.QPACK: data () => CompressionAlgo
+ Network.QPACK: data CompressionAlgo
- Network.QPACK: data () => EncodeStrategy
+ Network.QPACK: data EncodeStrategy
- Network.QPACK: type DecoderInstructionHandler = (Int -> IO EncodedDecoderInstruction) -> IO ()
+ Network.QPACK: type DecoderInstructionHandler = Int -> IO EncodedDecoderInstruction -> IO ()
- Network.QPACK: type EncoderInstructionHandler = (Int -> IO EncodedEncoderInstruction) -> IO ()
+ Network.QPACK: type EncoderInstructionHandler = Int -> IO EncodedEncoderInstruction -> IO ()
- Network.QPACK: type InstructionHandler = (Int -> IO ByteString) -> IO ()
+ Network.QPACK: type InstructionHandler = Int -> IO ByteString -> IO ()
- Network.QPACK.Internal: data () => ApplicationProtocolError
+ Network.QPACK.Internal: data ApplicationProtocolError
- Network.QPACK.Internal: data () => CompressionAlgo
+ Network.QPACK.Internal: data CompressionAlgo
- Network.QPACK.Internal: data () => EncodeStrategy
+ Network.QPACK.Internal: data EncodeStrategy

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for http3 +## 0.0.23++* Enclosing IPv6 address in :authority+ ## 0.0.22  * Using `ThreadManager` of `time-manager`.
Network/HQ/Client.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-}-{-# LANGUAGE RecordWildCards #-}  -- | A client library for HTTP/0.9. module Network.HQ.Client (
Network/HQ/Server.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE RecordWildCards #-}  -- | A server library for HTTP/0.9. module Network.HQ.Server (
Network/HTTP3/Client.hs view
@@ -19,13 +19,15 @@  import Control.Concurrent import qualified Control.Exception as E-import qualified Data.ByteString.Char8 as C8+import qualified Data.ByteString.UTF8 as UTF8 import Data.IORef+import Data.IP (IPv6) import Network.HTTP.Semantics.Client import Network.HTTP.Semantics.Client.Internal import Network.QUIC (Connection) import qualified Network.QUIC as QUIC import Network.QUIC.Internal (possibleMyStreams)+import Text.Read (readMaybe)  import Imports import Network.HTTP3.Config@@ -96,4 +98,8 @@                 processResponse rsp   where     hdr = outObjHeaders outobj-    hdr' = (":scheme", scm) : (":authority", C8.pack auth) : hdr+    isIPv6 = isJust (readMaybe auth :: Maybe IPv6)+    auth'+        | isIPv6 = "[" <> UTF8.fromString auth <> "]"+        | otherwise = UTF8.fromString auth+    hdr' = (":scheme", scm) : (":authority", auth') : hdr
Network/QPACK/Error.hs view
@@ -13,7 +13,6 @@ ) where  import Control.Exception-import Data.Typeable  import Network.QUIC @@ -31,12 +30,12 @@ data DecodeError     = IllegalStaticIndex     | IllegalInsertCount-    deriving (Eq, Show, Typeable)+    deriving (Eq, Show)  data EncoderInstructionError = EncoderInstructionError-    deriving (Eq, Show, Typeable)+    deriving (Eq, Show) data DecoderInstructionError = DecoderInstructionError-    deriving (Eq, Show, Typeable)+    deriving (Eq, Show)  instance Exception DecodeError instance Exception EncoderInstructionError
Network/QPACK/Table/Dynamic.hs view
@@ -183,9 +183,9 @@         x <- readTVar insertionPoint         writeTVar insertionPoint (x + 1)         return x-    maxN <- atomically $ readTVar maxNumOfEntries+    maxN <- readTVarIO maxNumOfEntries     let i = insp `mod` maxN-    table <- atomically $ readTVar circularTable+    table <- readTVarIO circularTable     atomically $ unsafeWrite table i ent     let revtbl = getRevIndex dyntbl     let ai = AbsoluteIndex insp
Network/QPACK/Table/RevIndex.hs view
@@ -77,7 +77,9 @@         lst =             zipWith (\(k, v) i -> (k, (v, i))) staticTableList $                 map (SIndex . AbsoluteIndex) [0 ..]-        extract xs = (fst (head xs), map snd xs)+        extract xs = (headFst xs, map snd xs)+        headFst [] = error "headFst"+        headFst (x : _) = fst x  {-# INLINE lookupStaticRevIndex #-} lookupStaticRevIndex :: Int -> FieldValue -> RevResult
http3.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               http3-version:            0.0.22+version:            0.0.23 license:            BSD-3-Clause license-file:       LICENSE maintainer:         Kazu Yamamoto <kazu@iij.ad.jp>@@ -77,20 +77,22 @@     ghc-options:        -Wall     build-depends:         base >=4.9 && <5,-        async,         array,+        async,         bytestring,         case-insensitive,         containers,         http-semantics >= 0.3 && <0.4,         http-types,         http2 >=5.3.4 && <5.4,+        iproute >= 1.7 && < 1.8,         network,         network-byte-order,-        quic >= 0.2 && < 0.3,+        quic >= 0.2.11 && < 0.3,         sockaddr,         stm,-        time-manager >= 0.2 && < 0.3+        time-manager >= 0.2 && < 0.3,+        utf8-string >=1.0 && <1.1  executable h3-server     main-is:            h3-server.hs
test/HTTP3/ErrorSpec.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE OverloadedStrings #-}- module HTTP3.ErrorSpec where  import Data.ByteString ()
test/HTTP3/Server.hs view
@@ -93,4 +93,6 @@     ctx' = CH.hashUpdate ctx bs  firstTrailerValue :: TokenHeaderTable -> FieldValue-firstTrailerValue = snd . Prelude.head . fst+firstTrailerValue tbl = case fst tbl of+    [] -> error "firstTrailerValue"+    x : _ -> snd x
test/QPACK/QIFSpec.hs view
@@ -69,7 +69,7 @@   where     loop = do         hdr' <- fromCaseSensitive <$> headerlist h-        if hdr' == []+        if null hdr'             then                 putMVar mvar ()             else do
util/Common.hs view
@@ -36,9 +36,9 @@ split :: Char -> String -> [String] split _ "" = [] split c s = case break (c ==) s of-    ("", r) -> split c (tail r)+    ("", r) -> split c (drop 1 r)     (s', "") -> [s']-    (s', r) -> s' : split c (tail r)+    (s', r) -> s' : split c (drop 1 r)  getLogger :: Maybe FilePath -> (String -> IO ()) getLogger Nothing = \_ -> return ()