Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-warp-tls for openSUSE:Factory checked in at 2024-04-28 21:49:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-warp-tls (Old)
and /work/SRC/openSUSE:Factory/.ghc-warp-tls.new.1880 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-warp-tls"
Sun Apr 28 21:49:23 2024 rev:12 rq:1170357 version:3.4.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-warp-tls/ghc-warp-tls.changes 2024-02-12 18:58:35.520348082 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-warp-tls.new.1880/ghc-warp-tls.changes 2024-04-29 09:09:50.529616289 +0200
@@ -1,0 +2,9 @@
+Fri Apr 19 10:46:05 UTC 2024 - Peter Simons
+
+- Update warp-tls to version 3.4.5.
+ ## 3.4.5
+
+ * Making mkConn of WarpTLS interruptible
+ [#984](https://github.com/yesodweb/wai/pull/984)
+
+-------------------------------------------------------------------
Old:
----
warp-tls-3.4.4.tar.gz
New:
----
warp-tls-3.4.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-warp-tls.spec ++++++
--- /var/tmp/diff_new_pack.91z03N/_old 2024-04-29 09:09:50.925630702 +0200
+++ /var/tmp/diff_new_pack.91z03N/_new 2024-04-29 09:09:50.925630702 +0200
@@ -19,7 +19,7 @@
%global pkg_name warp-tls
%global pkgver %{pkg_name}-%{version}
Name: ghc-%{pkg_name}
-Version: 3.4.4
+Version: 3.4.5
Release: 0
Summary: HTTP over TLS support for Warp via the TLS package
License: MIT
++++++ warp-tls-3.4.4.tar.gz -> warp-tls-3.4.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-tls-3.4.4/ChangeLog.md new/warp-tls-3.4.5/ChangeLog.md
--- old/warp-tls-3.4.4/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200
+++ new/warp-tls-3.4.5/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,10 @@
# ChangeLog
+## 3.4.5
+
+* Making mkConn of WarpTLS interruptible
+ [#984](https://github.com/yesodweb/wai/pull/984)
+
## 3.4.4
* Allow warp v3.4.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-tls-3.4.4/Network/Wai/Handler/WarpTLS.hs new/warp-tls-3.4.5/Network/Wai/Handler/WarpTLS.hs
--- old/warp-tls-3.4.4/Network/Wai/Handler/WarpTLS.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/warp-tls-3.4.5/Network/Wai/Handler/WarpTLS.hs 2001-09-09 03:46:40.000000000 +0200
@@ -95,6 +95,8 @@
try,
)
import qualified UnliftIO.Exception as E
+import UnliftIO.Concurrent (newEmptyMVar, putMVar, takeMVar, forkIOWithUnmask)
+import UnliftIO.Timeout (timeout)
----------------------------------------------------------------
@@ -318,8 +320,18 @@
-> Socket
-> params
-> IO (Connection, Transport)
-mkConn tlsset set s params = (safeRecv s 4096 >>= switch) `onException` close s
+mkConn tlsset set s params = do
+ var <- newEmptyMVar
+ _ <- forkIOWithUnmask $ \umask -> do
+ let tm = settingsTimeout set * 1000000
+ mct <- umask (timeout tm recvFirstBS)
+ putMVar var mct
+ mbs <- takeMVar var
+ case mbs of
+ Nothing -> throwIO IncompleteHeaders
+ Just bs -> switch bs
where
+ recvFirstBS = safeRecv s 4096 `onException` close s
switch firstBS
| S.null firstBS = close s >> throwIO ClientClosedConnectionPrematurely
| S.head firstBS == 0x16 = httpOverTls tlsset set s firstBS params
@@ -335,22 +347,24 @@
-> S.ByteString
-> params
-> IO (Connection, Transport)
-httpOverTls TLSSettings{..} _set s bs0 params = do
- pool <- newBufferPool 2048 16384
- rawRecvN <- makeRecvN bs0 $ receive s pool
- let recvN = wrappedRecvN rawRecvN
- ctx <- TLS.contextNew (backend recvN) params
- TLS.contextHookSetLogging ctx tlsLogging
- TLS.handshake ctx
- h2 <- (== Just "h2") <$> TLS.getNegotiatedProtocol ctx
- isH2 <- I.newIORef h2
- writeBuffer <- createWriteBuffer 16384
- writeBufferRef <- I.newIORef writeBuffer
- -- Creating a cache for leftover input data.
- tls <- getTLSinfo ctx
- mysa <- getSocketName s
- return (conn ctx writeBufferRef isH2 mysa, tls)
+httpOverTls TLSSettings{..} _set s bs0 params =
+ makeConn `onException` close s
where
+ makeConn = do
+ pool <- newBufferPool 2048 16384
+ rawRecvN <- makeRecvN bs0 $ receive s pool
+ let recvN = wrappedRecvN rawRecvN
+ ctx <- TLS.contextNew (backend recvN) params
+ TLS.contextHookSetLogging ctx tlsLogging
+ TLS.handshake ctx
+ h2 <- (== Just "h2") <$> TLS.getNegotiatedProtocol ctx
+ isH2 <- I.newIORef h2
+ writeBuffer <- createWriteBuffer 16384
+ writeBufferRef <- I.newIORef writeBuffer
+ -- Creating a cache for leftover input data.
+ tls <- getTLSinfo ctx
+ mysa <- getSocketName s
+ return (conn ctx writeBufferRef isH2 mysa, tls)
backend recvN =
TLS.Backend
{ TLS.backendFlush = return ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warp-tls-3.4.4/warp-tls.cabal new/warp-tls-3.4.5/warp-tls.cabal
--- old/warp-tls-3.4.4/warp-tls.cabal 2001-09-09 03:46:40.000000000 +0200
+++ new/warp-tls-3.4.5/warp-tls.cabal 2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
Name: warp-tls
-Version: 3.4.4
+Version: 3.4.5
Synopsis: HTTP over TLS support for Warp via the TLS package
License: MIT
License-file: LICENSE