Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-warp for openSUSE:Factory 
checked in at 2026-11-27 19:45:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-warp (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-warp.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-warp"

Fri Nov 27 19:45:14 2026 rev:23 rq:1401160 version:3.4.22

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-warp/ghc-warp.changes        2026-11-24 
12:44:14.290718938 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-warp.new.1340718/ghc-warp.changes   
2026-11-27 19:49:33.301377477 +0100
@@ -1,0 +2,9 @@
+Mon Nov 23 02:36:56 UTC 2026 - Peter Simons <[email protected]>
+
+- Update warp to version 3.4.22.
+  ## 3.4.22
+
+  * warp: backport total HTTP/2 transport checks to v3.4
+    [#1177](https://github.com/yesodweb/wai/pull/1177)
+
+-------------------------------------------------------------------

Old:
----
  warp-3.4.21.tar.gz

New:
----
  warp-3.4.22.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-warp.spec ++++++
--- /var/tmp/diff_new_pack.crOybU/_old  2026-11-27 19:49:34.361422484 +0100
+++ /var/tmp/diff_new_pack.crOybU/_new  2026-11-27 19:49:34.367422739 +0100
@@ -20,7 +20,7 @@
 %bcond_with ghc_prof
 %bcond_with tests
 Name:           ghc-%pkg_name
-Version:        3.4.21
+Version:        3.4.22
 Release:        0
 %global pkgver %pkg_name-%{version}
 Summary:        A fast, light-weight web server for WAI applications

++++++ warp-3.4.21.tar.gz -> warp-3.4.22.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/warp-3.4.21/ChangeLog.md new/warp-3.4.22/ChangeLog.md
--- old/warp-3.4.21/ChangeLog.md        2001-09-09 03:46:40.000000000 +0200
+++ new/warp-3.4.22/ChangeLog.md        2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,10 @@
 # ChangeLog for warp
 
+## 3.4.22
+
+* warp: backport total HTTP/2 transport checks to v3.4
+  [#1177](https://github.com/yesodweb/wai/pull/1177)
+
 ## 3.4.21
 
 Requires network 3.2.12.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/warp-3.4.21/Network/Wai/Handler/Warp/HTTP2/Types.hs 
new/warp-3.4.22/Network/Wai/Handler/Warp/HTTP2/Types.hs
--- old/warp-3.4.21/Network/Wai/Handler/Warp/HTTP2/Types.hs     2001-09-09 
03:46:40.000000000 +0200
+++ new/warp-3.4.22/Network/Wai/Handler/Warp/HTTP2/Types.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -15,11 +15,13 @@
 
 isHTTP2 :: Transport -> Bool
 isHTTP2 TCP = False
-isHTTP2 tls = useHTTP2
+isHTTP2 TLS{tlsNegotiatedProtocol = protocol} = useHTTP2
   where
-    useHTTP2 = case tlsNegotiatedProtocol tls of
+    useHTTP2 = case protocol of
         Nothing -> False
         Just proto -> "h2" `BS.isPrefixOf` proto
+-- QUIC uses the HTTP/3 entry point, not HTTP/2 ALPN dispatch.
+isHTTP2 QUIC{} = False
 
 ----------------------------------------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/warp-3.4.21/Network/Wai/Handler/Warp/HTTP2.hs 
new/warp-3.4.22/Network/Wai/Handler/Warp/HTTP2.hs
--- old/warp-3.4.21/Network/Wai/Handler/Warp/HTTP2.hs   2001-09-09 
03:46:40.000000000 +0200
+++ new/warp-3.4.22/Network/Wai/Handler/Warp/HTTP2.hs   2001-09-09 
03:46:40.000000000 +0200
@@ -91,12 +91,13 @@
     -- on it.
     checkTLS = case transport of
         TCP -> return True -- direct
-        tls
-            | tls12orLater tls -> return True
+        TLS{tlsMajorVersion = major, tlsMinorVersion = minor}
+            | major == 3 && minor >= 3 -> return True
             | otherwise -> do
                 goaway conn H2.InadequateSecurity "Weak TLS"
                 return False
-    tls12orLater tls = tlsMajorVersion tls == 3 && tlsMinorVersion tls >= 3
+        -- QUIC establishes TLS 1.3 itself and uses the HTTP/3 entry point.
+        QUIC{} -> return True
 
 -- | Converting WAI application to the server type of http2 library.
 --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/warp-3.4.21/test/HTTP2TransportSpec.hs 
new/warp-3.4.22/test/HTTP2TransportSpec.hs
--- old/warp-3.4.21/test/HTTP2TransportSpec.hs  1970-01-01 01:00:00.000000000 
+0100
+++ new/warp-3.4.22/test/HTTP2TransportSpec.hs  2001-09-09 03:46:40.000000000 
+0200
@@ -0,0 +1,40 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE OverloadedStrings #-}
+
+module HTTP2TransportSpec (spec) where
+
+import Data.ByteString (ByteString)
+import Network.Wai.Handler.Warp.HTTP2.Types (isHTTP2)
+import Network.Wai.Handler.Warp.Types (Transport (..))
+import Test.Hspec
+
+spec :: Spec
+spec = describe "HTTP/2 ALPN transport dispatch" $ do
+    it "leaves plain TCP to prior-knowledge detection" $
+        isHTTP2 TCP `shouldBe` False
+    it "does not select HTTP/2 without TLS ALPN" $
+        isHTTP2 (tls Nothing) `shouldBe` False
+    it "does not select HTTP/2 for HTTP/1.1 ALPN" $
+        isHTTP2 (tls (Just "http/1.1")) `shouldBe` False
+    it "selects HTTP/2 for h2 ALPN" $
+        isHTTP2 (tls (Just "h2")) `shouldBe` True
+    it "preserves the existing h2 prefix behavior" $
+        isHTTP2 (tls (Just "h2-14")) `shouldBe` True
+    it "does not use the HTTP/2 ALPN path for QUIC" $
+        isHTTP2 (quic (Just "h3")) `shouldBe` False
+    it "does not inspect TLS fields for QUIC without ALPN" $
+        isHTTP2 (quic Nothing) `shouldBe` False
+    it "does not treat QUIC with an h2 label as TLS" $
+        isHTTP2 (quic (Just "h2")) `shouldBe` False
+
+tls :: Maybe ByteString -> Transport
+tls protocol = TLS 3 3 protocol 0
+#ifdef MIN_VERSION_crypton_x509
+    Nothing
+#endif
+
+quic :: Maybe ByteString -> Transport
+quic protocol = QUIC protocol 0
+#ifdef MIN_VERSION_crypton_x509
+    Nothing
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/warp-3.4.21/warp.cabal new/warp-3.4.22/warp.cabal
--- old/warp-3.4.21/warp.cabal  2001-09-09 03:46:40.000000000 +0200
+++ new/warp-3.4.22/warp.cabal  2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:      >=1.10
 name:               warp
-version:            3.4.21
+version:            3.4.22
 license:            MIT
 license-file:       LICENSE
 maintainer:         [email protected]
@@ -190,6 +190,7 @@
         GracefulShutdownSpec
         HTTP
         HTTP2Spec
+        HTTP2TransportSpec
         PackIntSpec
         ReadIntSpec
         RequestSpec

Reply via email to