happstack-server-tls 7.2.1.3 → 7.2.1.5
raw patch · 2 files changed
+19/−6 lines, 2 filesdep ~bytestringdep ~happstack-serverdep ~networkPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: bytestring, happstack-server, network
API changes (from Hackage documentation)
+ Happstack.Server.Internal.TimeoutSocketTLS: sGet :: Handle -> SSL -> IO (Maybe ByteString)
Files
happstack-server-tls.cabal view
@@ -1,5 +1,5 @@ Name: happstack-server-tls-Version: 7.2.1.3+Version: 7.2.1.5 Synopsis: extend happstack-server with https:// support (TLS/SSL) Description: Allows you to use https:// without relying on apache, nginx, etc Homepage: http://www.happstack.com/@@ -11,7 +11,7 @@ Category: Web, Happstack Build-type: Simple Cabal-version: >=1.10-tested-with: GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.5, GHC==8.8.4, GHC==8.10.7, GHC==9.0.2, GHC==9.2.2+tested-with: GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.5, GHC==8.8.4, GHC==8.10.7, GHC==9.0.2, GHC==9.2.5, GHC==9.4.8, GHC==9.6.4, GHC==9.8.1 extra-source-files: README.md source-repository head@@ -27,12 +27,12 @@ Happstack.Server.SimpleHTTPS Build-Depends: base < 5,- bytestring >= 0.9 && < 0.12,+ bytestring >= 0.9 && < 0.13, extensible-exceptions == 0.1.*,- happstack-server >= 6.6.4 && < 7.9,- hslogger >= 1.1 && < 1.4,+ happstack-server >= 6.6.4 && < 7.10,+ hslogger >= 1.1 && < 1.4, HsOpenSSL >= 0.10 && < 0.12,- network > 2.6 && < 2.9 || >= 3.0.0 && < 3.2,+ network > 3.0.0 && < 3.2, sendfile == 0.7.*, time >= 1.2 && < 1.14 -- these extra libraries are not needed to build/install the server
src/Happstack/Server/Internal/TimeoutSocketTLS.hs view
@@ -30,6 +30,18 @@ TM.tickle thandle {-# INLINE sPutTickle #-} +sGet :: TM.Handle+ -> SSL+ -> IO (Maybe B.ByteString)+sGet handle ssl =+ do s <- SSL.read ssl chunkSize+ TM.tickle handle+ if S.null s+ then pure Nothing+ else pure (Just s)+ where+ chunkSize = 65536+ sGetContents :: TM.Handle -> SSL -- ^ Connected socket -> IO L.ByteString -- ^ Data received@@ -52,6 +64,7 @@ close socket `catch` ignoreException , toPutLazy = sPutLazyTickle handle ssl , toPut = sPutTickle handle ssl+ , toGet = sGet handle ssl , toGetContents = sGetContents handle ssl , toSendFile = sendFileTickle handle ssl , toSecure = True