packages feed

http2 5.4.2 → 5.4.3

raw patch · 3 files changed

+16/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,10 +1,16 @@ # ChangeLog for http2 +## 5.4.3++* auxSendInformational: gate usage with CPP to http-semantics >= 0.4.1+  [#170](https://github.com/kazu-yamamoto/http2/pull/170)+ ## 5.4.2  * Support informational (1xx) responses, e.g. 103 Early Hints. Servers can send   them via `auxSendInformational`; clients can observe them via the new   `confOnInformational` callback in `Config`.+  [#168](https://github.com/kazu-yamamoto/http2/pull/168)  ## 5.4.1 
Network/HTTP2/Server/Worker.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} @@ -6,7 +7,6 @@ ) where  import Control.Concurrent.STM-import qualified Data.ByteString.Char8 as C8 import Data.IORef import Network.HTTP.Semantics import Network.HTTP.Semantics.IO@@ -19,6 +19,10 @@ import Network.HTTP2.Frame import Network.HTTP2.H2 +#if MIN_VERSION_http_semantics(0,4,1)+import qualified Data.ByteString.Char8 as C8+#endif+ ----------------------------------------------------------------  runServer :: Config -> Server -> Launch@@ -30,7 +34,9 @@                     { auxTimeHandle = th                     , auxMySockAddr = mySockAddr                     , auxPeerSockAddr = peerSockAddr+#if MIN_VERSION_http_semantics(0,4,1)                     , auxSendInformational = sendInformational ctx strm+#endif                     }             request = Request req'         lc <- newLoopCheck strm Nothing@@ -50,6 +56,7 @@  ---------------------------------------------------------------- +#if MIN_VERSION_http_semantics(0,4,1) -- | Send an informational (1xx) response, e.g. 103 Early Hints, on the given --   stream ahead of the final response. This is wired into 'auxSendInformational' --   so that a server (or WAI handler via Warp) can emit early hints. It blocks@@ -60,6 +67,7 @@     lc <- newLoopCheck strm Nothing     let hdr = (":status", C8.pack (show (statusCode st))) : hdrs     syncWithSender ctx strm (OInformational hdr) lc+#endif  ---------------------------------------------------------------- 
http2.cabal view
@@ -1,6 +1,6 @@ cabal-version:      >=1.10 name:               http2-version:            5.4.2+version:            5.4.3 license:            BSD3 license-file:       LICENSE maintainer:         Kazu Yamamoto <kazu@iij.ad.jp>