Skip to content

Commit 777d029

Browse files
committed
7.2.1.5 - allow latest dependencies
1 parent 0b91303 commit 777d029

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

happstack-server-tls.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: happstack-server-tls
2-
Version: 7.2.1.4
2+
Version: 7.2.1.5
33
Synopsis: extend happstack-server with https:// support (TLS/SSL)
44
Description: Allows you to use https:// without relying on apache, nginx, etc
55
Homepage: http://www.happstack.com/
@@ -11,7 +11,7 @@ Copyright: 2012-2019, Jeremy Shaw
1111
Category: Web, Happstack
1212
Build-type: Simple
1313
Cabal-version: >=1.10
14-
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.3
14+
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
1515
extra-source-files: README.md
1616

1717
source-repository head
@@ -27,9 +27,9 @@ Library
2727
Happstack.Server.SimpleHTTPS
2828

2929
Build-Depends: base < 5,
30-
bytestring >= 0.9 && < 0.12,
30+
bytestring >= 0.9 && < 0.13,
3131
extensible-exceptions == 0.1.*,
32-
happstack-server >= 6.6.4 && < 7.9,
32+
happstack-server >= 6.6.4 && < 7.10,
3333
hslogger >= 1.1 && < 1.4,
3434
HsOpenSSL >= 0.10 && < 0.12,
3535
network > 3.0.0 && < 3.2,

shell.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let
66

77
f = { mkDerivation, base, bytestring, extensible-exceptions
88
, happstack-server, hslogger, HsOpenSSL, network, openssl, sendfile
9-
, stdenv, time, unix
9+
, stdenv, time, unix, cabal-install
1010
}:
1111
mkDerivation {
1212
pname = "happstack-server-tls";

src/Happstack/Server/Internal/TimeoutSocketTLS.hs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ sPutTickle thandle ssl cs =
3030
TM.tickle thandle
3131
{-# INLINE sPutTickle #-}
3232

33+
sGet :: TM.Handle
34+
-> SSL
35+
-> IO (Maybe B.ByteString)
36+
sGet handle ssl =
37+
do s <- SSL.read ssl chunkSize
38+
TM.tickle handle
39+
if S.null s
40+
then pure Nothing
41+
else pure (Just s)
42+
where
43+
chunkSize = 65536
44+
3345
sGetContents :: TM.Handle
3446
-> SSL -- ^ Connected socket
3547
-> IO L.ByteString -- ^ Data received
@@ -52,6 +64,7 @@ timeoutSocketIO handle socket ssl =
5264
close socket `catch` ignoreException
5365
, toPutLazy = sPutLazyTickle handle ssl
5466
, toPut = sPutTickle handle ssl
67+
, toGet = sGet handle ssl
5568
, toGetContents = sGetContents handle ssl
5669
, toSendFile = sendFileTickle handle ssl
5770
, toSecure = True

0 commit comments

Comments
 (0)