on master help sign in
conduit 1.1
49d8f4bMichael Snoyman
wai-eventsource/wai-eventsource.cabal+2−2
@@ -1,5 +1,5 @@
1Name: wai-eventsource
1Name: wai-eventsource
2−Version: 2.0.0.1
2+Version: 2.0.0.2
3Synopsis: WAI support for server-sent events
3Synopsis: WAI support for server-sent events
4Description: WAI support for server-sent events
4Description: WAI support for server-sent events
5License: MIT
5License: MIT
@@ -17,7 +17,7 @@ Library
17 base >= 4.3 && < 5
17 base >= 4.3 && < 5
18 , bytestring >= 0.9.1.4
18 , bytestring >= 0.9.1.4
19 , blaze-builder >= 0.3 && < 0.4
19 , blaze-builder >= 0.3 && < 0.4
20− , conduit >= 0.5 && < 1.1
20+ , conduit >= 0.5 && < 1.2
21 , http-types >= 0.7
21 , http-types >= 0.7
22 , wai >= 2.0 && < 2.2
22 , wai >= 2.0 && < 2.2
23 , transformers
23 , transformers
wai-extra/Network/Wai/Middleware/Gzip.hs+2−1
@@ -31,6 +31,7 @@ import qualified Data.ByteString as S
31import Data.Default
31import Data.Default
32import Network.HTTP.Types (Status, Header)
32import Network.HTTP.Types (Status, Header)
33import Control.Monad.IO.Class (liftIO)
33import Control.Monad.IO.Class (liftIO)
34+import Control.Monad.Trans.Resource (runResourceT)
34import System.Directory (doesFileExist, createDirectoryIfMissing)
35import System.Directory (doesFileExist, createDirectoryIfMissing)
35import qualified Data.Conduit as C
36import qualified Data.Conduit as C
36import qualified Data.Conduit.Zlib as CZ
37import qualified Data.Conduit.Zlib as CZ
@@ -102,7 +103,7 @@ compressFile s hs file cache = do
102 else do
103 else do
103 createDirectoryIfMissing True cache
104 createDirectoryIfMissing True cache
104 x <-
105 x <-
105− try $ C.runResourceT $ CB.sourceFile file
106+ try $ runResourceT $ CB.sourceFile file
106 C.$$ CZ.gzip C.=$ CB.sinkFile tmpfile
107 C.$$ CZ.gzip C.=$ CB.sinkFile tmpfile
107 either onErr (const onSucc) x
108 either onErr (const onSucc) x
108 where
109 where
wai-extra/wai-extra.cabal+7−5
@@ -1,5 +1,5 @@
1Name: wai-extra
1Name: wai-extra
2−Version: 2.1.1
2+Version: 2.1.1.1
3Synopsis: Provides some basic WAI handlers and middleware.
3Synopsis: Provides some basic WAI handlers and middleware.
4Description: The goal here is to provide common features without many dependencies.
4Description: The goal here is to provide common features without many dependencies.
5License: MIT
5License: MIT
@@ -35,11 +35,12 @@ Library
35 , data-default
35 , data-default
36 , fast-logger >= 2.1 && < 2.2
36 , fast-logger >= 2.1 && < 2.2
37 , wai-logger >= 2.0 && < 2.2
37 , wai-logger >= 2.0 && < 2.2
38− , conduit >= 1.0 && < 1.1
38+ , conduit >= 1.0 && < 1.2
39+ , conduit-extra >= 0.1 && < 1.2
39− , zlib-conduit >= 0.5 && < 1.1
40+ , zlib-conduit >= 0.5 && < 1.2
40− , blaze-builder-conduit >= 0.5 && < 1.1
41+ , blaze-builder-conduit >= 0.5 && < 1.2
41 , ansi-terminal
42 , ansi-terminal
42− , resourcet >= 0.4.6 && < 0.5
43+ , resourcet >= 0.4.6 && < 1.2
43 , void >= 0.5
44 , void >= 0.5
44 , stringsearch >= 0.3 && < 0.4
45 , stringsearch >= 0.3 && < 0.4
45 , containers
46 , containers
@@ -95,6 +96,7 @@ test-suite tests
95 , conduit
96 , conduit
96 , fast-logger >= 2.1
97 , fast-logger >= 2.1
97 , resourcet
98 , resourcet
99+ , conduit-extra
98 ghc-options: -Wall
100 ghc-options: -Wall
99
101
100source-repository head
102source-repository head
wai-frontend-monadcgi/wai-frontend-monadcgi.cabal+3−2
@@ -1,5 +1,5 @@
1name: wai-frontend-monadcgi
1name: wai-frontend-monadcgi
2−version: 2.0.0.1
2+version: 2.0.0.2
3license: MIT
3license: MIT
4license-file: LICENSE
4license-file: LICENSE
5author: Michael Snoyman <michael@snoyman.com>
5author: Michael Snoyman <michael@snoyman.com>
@@ -16,7 +16,8 @@ library
16 , bytestring
16 , bytestring
17 , containers >= 0.2
17 , containers >= 0.2
18 , cgi
18 , cgi
19− , conduit >= 0.5 && < 1.1
19+ , conduit >= 0.5 && < 1.2
20+ , conduit-extra
20 , http-types
21 , http-types
21 , transformers
22 , transformers
22 , case-insensitive
23 , case-insensitive
wai-handler-launch/wai-handler-launch.cabal+5−4
@@ -1,5 +1,5 @@
1Name: wai-handler-launch
1Name: wai-handler-launch
2−Version: 2.0.1.1
2+Version: 2.0.1.2
3Synopsis: Launch a web app in the default browser.
3Synopsis: Launch a web app in the default browser.
4Description: This handles cross-platform launching and inserts Javascript code to ping the server. When the server no longer receives pings, it shuts down.
4Description: This handles cross-platform launching and inserts Javascript code to ping the server. When the server no longer receives pings, it shuts down.
5License: MIT
5License: MIT
@@ -19,9 +19,10 @@ Library
19 , transformers >= 0.2.2 && < 0.4
19 , transformers >= 0.2.2 && < 0.4
20 , bytestring >= 0.9.1.4
20 , bytestring >= 0.9.1.4
21 , blaze-builder >= 0.2.1.4 && < 0.4
21 , blaze-builder >= 0.2.1.4 && < 0.4
22− , conduit >= 0.5 && < 1.1
22+ , conduit >= 0.5 && < 1.2
23+ , conduit-extra >= 0.0 && < 1.2
23− , blaze-builder-conduit >= 0.5 && < 1.1
24+ , blaze-builder-conduit >= 0.5 && < 1.2
24− , zlib-conduit >= 0.5 && < 1.1
25+ , zlib-conduit >= 0.5 && < 1.2
25
26
26 if os(windows)
27 if os(windows)
27 c-sources: windows.c
28 c-sources: windows.c
wai-test/wai-test.cabal+4−3
@@ -1,5 +1,5 @@
1name: wai-test
1name: wai-test
2−version: 2.0.1
2+version: 2.0.1.1
3license: MIT
3license: MIT
4license-file: LICENSE
4license-file: LICENSE
5author: Michael Snoyman <michael@snoyman.com>
5author: Michael Snoyman <michael@snoyman.com>
@@ -20,8 +20,9 @@ library
20 , blaze-builder >= 0.2.1.4 && < 0.4
20 , blaze-builder >= 0.2.1.4 && < 0.4
21 , transformers >= 0.2.2 && < 0.4
21 , transformers >= 0.2.2 && < 0.4
22 , containers >= 0.2
22 , containers >= 0.2
23− , conduit >= 0.5 && < 1.1
23+ , conduit >= 0.5 && < 1.2
24+ , conduit-extra
24− , blaze-builder-conduit >= 0.5 && < 1.1
25+ , blaze-builder-conduit >= 0.5 && < 1.2
25 , cookie >= 0.2 && < 0.5
26 , cookie >= 0.2 && < 0.5
26 , http-types >= 0.7
27 , http-types >= 0.7
27 , case-insensitive >= 0.2
28 , case-insensitive >= 0.2
wai-websockets/wai-websockets.cabal+2−2
@@ -1,5 +1,5 @@
1Name: wai-websockets
1Name: wai-websockets
2−Version: 2.1.0
2+Version: 2.1.0.1
3Synopsis: Provide a bridge betweeen WAI and the websockets package.
3Synopsis: Provide a bridge betweeen WAI and the websockets package.
4License: MIT
4License: MIT
5License-file: LICENSE
5License-file: LICENSE
@@ -19,7 +19,7 @@ flag example
19Library
19Library
20 Build-Depends: base >= 3 && < 5
20 Build-Depends: base >= 3 && < 5
21 , bytestring >= 0.9.1.4
21 , bytestring >= 0.9.1.4
22− , conduit >= 0.5 && < 1.1
22+ , conduit >= 0.5 && < 1.2
23 , wai >= 2.1 && < 2.2
23 , wai >= 2.1 && < 2.2
24 , blaze-builder >= 0.2.1.4 && < 0.4
24 , blaze-builder >= 0.2.1.4 && < 0.4
25 , case-insensitive >= 0.2
25 , case-insensitive >= 0.2
wai/wai.cabal+3−2
@@ -1,5 +1,5 @@
1Name: wai
1Name: wai
2−Version: 2.1.0
2+Version: 2.1.0.1
3Synopsis: Web Application Interface.
3Synopsis: Web Application Interface.
4Description: Provides a common protocol for communication between web applications and web servers.
4Description: Provides a common protocol for communication between web applications and web servers.
5License: MIT
5License: MIT
@@ -20,7 +20,8 @@ Library
20 Build-Depends: base >= 4 && < 5
20 Build-Depends: base >= 4 && < 5
21 , bytestring >= 0.9.1.4
21 , bytestring >= 0.9.1.4
22 , blaze-builder >= 0.2.1.4 && < 0.4
22 , blaze-builder >= 0.2.1.4 && < 0.4
23− , conduit >= 1.0.8 && < 1.1
23+ , conduit >= 1.0.8 && < 1.2
24+ , conduit-extra
24 , network >= 2.2.1.5
25 , network >= 2.2.1.5
25 , http-types >= 0.7
26 , http-types >= 0.7
26 , text >= 0.7
27 , text >= 0.7
warp-tls/Network/Wai/Handler/WarpTLS.hs+10−4
@@ -29,14 +29,20 @@ import Network.Wai
29import Network.Socket
29import Network.Socket
30import qualified Data.ByteString.Lazy as L
30import qualified Data.ByteString.Lazy as L
31import Data.Conduit.Binary (sourceFileRange)
31import Data.Conduit.Binary (sourceFileRange)
32+import Control.Monad.Trans.Resource (runResourceT)
32import qualified Data.Conduit as C
33import qualified Data.Conduit as C
33import qualified Data.Conduit.List as CL
34import qualified Data.Conduit.List as CL
34import Control.Exception (bracket, finally, handle)
35import Control.Exception (bracket, finally, handle)
35import qualified Network.TLS.Extra as TLSExtra
36import qualified Network.TLS.Extra as TLSExtra
36import qualified Data.ByteString as B
37import qualified Data.ByteString as B
38+#if MIN_VERSION_conduit(1,1,0)
39+import Data.Streaming.Network (bindPortTCP, acceptSafe)
40+#else
37−import Data.Conduit.Network (bindPort)
41+import Data.Conduit.Network (bindPort, acceptSafe)
42+#define bindPortTCP bindPort
43+#endif
38import Control.Applicative ((<$>))
44import Control.Applicative ((<$>))
39−import Data.Conduit.Network (sourceSocket, sinkSocket, acceptSafe)
45+import Data.Conduit.Network (sourceSocket, sinkSocket)
40import Data.Maybe (fromMaybe)
46import Data.Maybe (fromMaybe)
41import qualified Data.IORef as I
47import qualified Data.IORef as I
42import Control.Exception (Exception, throwIO)
48import Control.Exception (Exception, throwIO)
@@ -148,7 +154,7 @@ runTLSSocket TLSSettings {..} set sock app = do
148 , connSendAll = TLS.sendData ctx . L.fromChunks . return
154 , connSendAll = TLS.sendData ctx . L.fromChunks . return
149 , connSendFile = \fp offset len _th headers -> do
155 , connSendFile = \fp offset len _th headers -> do
150 TLS.sendData ctx $ L.fromChunks headers
156 TLS.sendData ctx $ L.fromChunks headers
151− C.runResourceT $ sourceFileRange fp (Just offset) (Just len) C.$$ CL.mapM_ (TLS.sendData ctx . L.fromChunks . return)
157+ runResourceT $ sourceFileRange fp (Just offset) (Just len) C.$$ CL.mapM_ (TLS.sendData ctx . L.fromChunks . return)
152 , connClose =
158 , connClose =
153 TLS.bye ctx `finally`
159 TLS.bye ctx `finally`
154 TLS.contextClose ctx
160 TLS.contextClose ctx
@@ -190,7 +196,7 @@ instance Exception WarpTLSException
190runTLS :: TLSSettings -> Settings -> Application -> IO ()
196runTLS :: TLSSettings -> Settings -> Application -> IO ()
191runTLS tset set app = withSocketsDo $
197runTLS tset set app = withSocketsDo $
192 bracket
198 bracket
193− (bindPort (settingsPort set) (settingsHost set))
199+ (bindPortTCP (settingsPort set) (settingsHost set))
194 sClose
200 sClose
195 (\sock -> runTLSSocket tset set sock app)
201 (\sock -> runTLSSocket tset set sock app)
196
202
warp-tls/warp-tls.cabal+6−3
@@ -1,5 +1,5 @@
1Name: warp-tls
1Name: warp-tls
2−Version: 2.0.3.1
2+Version: 2.0.3.2
3Synopsis: HTTP over SSL/TLS support for Warp via the TLS package
3Synopsis: HTTP over SSL/TLS support for Warp via the TLS package
4License: MIT
4License: MIT
5License-file: LICENSE
5License-file: LICENSE
@@ -18,12 +18,15 @@ Library
18 , wai >= 2.0 && < 2.2
18 , wai >= 2.0 && < 2.2
19 , warp >= 2.0.2 && < 2.2
19 , warp >= 2.0.2 && < 2.2
20 , transformers >= 0.2
20 , transformers >= 0.2
21− , conduit >= 0.5 && < 1.1
21+ , conduit >= 0.5 && < 1.2
22+ , conduit-extra
22− , network-conduit >= 0.6 && < 1.1
23+ , network-conduit >= 0.6 && < 1.2
23 , data-default-class >= 0.0.1
24 , data-default-class >= 0.0.1
24 , tls >= 1.2.1
25 , tls >= 1.2.1
25 , network >= 2.2.1
26 , network >= 2.2.1
26 , cprng-aes >= 0.5.0
27 , cprng-aes >= 0.5.0
28+ , streaming-commons
29+ , resourcet
27 Exposed-modules: Network.Wai.Handler.WarpTLS
30 Exposed-modules: Network.Wai.Handler.WarpTLS
28 ghc-options: -Wall
31 ghc-options: -Wall
29
32
warp/Network/Wai/Handler/Warp/Run.hs+3−3
@@ -15,7 +15,7 @@ import qualified Data.ByteString as S
15import Data.Conduit
15import Data.Conduit
16import Data.Conduit.Internal (ResumableSource (..))
16import Data.Conduit.Internal (ResumableSource (..))
17import qualified Data.Conduit.List as CL
17import qualified Data.Conduit.List as CL
18−import Data.Conduit.Network (bindPort)
18+import Data.Streaming.Network (bindPortTCP)
19import Network (sClose, Socket)
19import Network (sClose, Socket)
20import Network.Socket (accept, SockAddr)
20import Network.Socket (accept, SockAddr)
21import qualified Network.Socket.ByteString as Sock
21import qualified Network.Socket.ByteString as Sock
@@ -74,7 +74,7 @@ runSettings set app = withSocketsDo $ do
74 var <- MV.newMVar Nothing
74 var <- MV.newMVar Nothing
75 let clean = MV.modifyMVar_ var $ \s -> maybe (return ()) sClose s >> return Nothing
75 let clean = MV.modifyMVar_ var $ \s -> maybe (return ()) sClose s >> return Nothing
76 void . forkIO $ bracket
76 void . forkIO $ bracket
77− (bindPort (settingsPort set) (settingsHost set))
77+ (bindPortTCP (settingsPort set) (settingsHost set))
78 (const clean)
78 (const clean)
79 (\s -> do
79 (\s -> do
80 MV.modifyMVar_ var (\_ -> return $ Just s)
80 MV.modifyMVar_ var (\_ -> return $ Just s)
@@ -83,7 +83,7 @@ runSettings set app = withSocketsDo $ do
83#else
83#else
84runSettings set app =
84runSettings set app =
85 bracket
85 bracket
86− (bindPort (settingsPort set) (settingsHost set))
86+ (bindPortTCP (settingsPort set) (settingsHost set))
87 sClose
87 sClose
88 (\socket -> do
88 (\socket -> do
89 setSocketCloseOnExec socket
89 setSocketCloseOnExec socket
warp/Network/Wai/Handler/Warp/Settings.hs+2−2
@@ -9,7 +9,7 @@ import qualified Data.Text as T
9import qualified Data.Text.IO as TIO
9import qualified Data.Text.IO as TIO
10import qualified Data.ByteString.Lazy.Char8 as L8
10import qualified Data.ByteString.Lazy.Char8 as L8
11import Data.Conduit
11import Data.Conduit
12−import Data.Conduit.Network (HostPreference (HostIPv4))
12+import Data.Conduit.Network (HostPreference)
13import GHC.IO.Exception (IOErrorType(..))
13import GHC.IO.Exception (IOErrorType(..))
14import qualified Network.HTTP.Types as H
14import qualified Network.HTTP.Types as H
15import Network.Socket (SockAddr)
15import Network.Socket (SockAddr)
@@ -64,7 +64,7 @@ data Settings = Settings
64defaultSettings :: Settings
64defaultSettings :: Settings
65defaultSettings = Settings
65defaultSettings = Settings
66 { settingsPort = 3000
66 { settingsPort = 3000
67− , settingsHost = HostIPv4
67+ , settingsHost = "*4"
68 , settingsOnException = defaultExceptionHandler
68 , settingsOnException = defaultExceptionHandler
69 , settingsOnExceptionResponse = defaultExceptionResponse
69 , settingsOnExceptionResponse = defaultExceptionResponse
70 , settingsOnOpen = const $ return True
70 , settingsOnOpen = const $ return True
warp/test/RunSpec.hs+7−1
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE ScopedTypeVariables #-}
3{-# LANGUAGE ScopedTypeVariables #-}
3
4
@@ -23,7 +24,12 @@ import System.IO.Unsafe (unsafePerformIO)
23import Test.Hspec
24import Test.Hspec
24import Control.Concurrent.MVar (newEmptyMVar, takeMVar, putMVar)
25import Control.Concurrent.MVar (newEmptyMVar, takeMVar, putMVar)
25import Control.Exception.Lifted (bracket, try, IOException, onException)
26import Control.Exception.Lifted (bracket, try, IOException, onException)
27+#if MIN_VERSION_conduit(1,1,0)
28+import Data.Streaming.Network (bindPortTCP)
29+#define bindPort bindPortTCP
30+#else
26import Data.Conduit.Network (bindPort)
31import Data.Conduit.Network (bindPort)
32+#endif
27import Network.Socket (sClose)
33import Network.Socket (sClose)
28import qualified Network.HTTP as HTTP
34import qualified Network.HTTP as HTTP
29
35
@@ -76,7 +82,7 @@ nextPort = unsafePerformIO $ I.newIORef 5000
76getPort :: IO Int
82getPort :: IO Int
77getPort = do
83getPort = do
78 port <- I.atomicModifyIORef nextPort $ \p -> (p + 1, p)
84 port <- I.atomicModifyIORef nextPort $ \p -> (p + 1, p)
79− esocket <- try $ bindPort port HostIPv4
85+ esocket <- try $ bindPort port "*4"
80 case esocket of
86 case esocket of
81 Left (_ :: IOException) -> RunSpec.getPort
87 Left (_ :: IOException) -> RunSpec.getPort
82 Right socket -> do
88 Right socket -> do
warp/warp.cabal+9−4
@@ -1,5 +1,5 @@
1Name: warp
1Name: warp
2−Version: 2.1.3
2+Version: 2.1.3.1
3Synopsis: A fast, light-weight web server for WAI applications.
3Synopsis: A fast, light-weight web server for WAI applications.
4License: MIT
4License: MIT
5License-file: LICENSE
5License-file: LICENSE
@@ -35,20 +35,22 @@ Library
35 Build-Depends: base >= 3 && < 5
35 Build-Depends: base >= 3 && < 5
36 , array
36 , array
37 , blaze-builder >= 0.3.3 && < 0.4
37 , blaze-builder >= 0.3.3 && < 0.4
38− , blaze-builder-conduit >= 0.5 && < 1.1
38+ , blaze-builder-conduit >= 0.5 && < 1.2
39 , bytestring >= 0.9.1.4
39 , bytestring >= 0.9.1.4
40 , case-insensitive >= 0.2
40 , case-insensitive >= 0.2
41− , conduit >= 0.5 && < 1.1
41+ , conduit >= 0.5 && < 1.2
42+ , conduit-extra
42 , ghc-prim
43 , ghc-prim
43 , http-types >= 0.7
44 , http-types >= 0.7
44 , lifted-base >= 0.1
45 , lifted-base >= 0.1
45− , network-conduit >= 0.5 && < 1.1
46+ , network-conduit >= 0.5 && < 1.2
46 , simple-sendfile >= 0.2.7 && < 0.3
47 , simple-sendfile >= 0.2.7 && < 0.3
47 , transformers >= 0.2.2 && < 0.4
48 , transformers >= 0.2.2 && < 0.4
48 , unix-compat >= 0.2
49 , unix-compat >= 0.2
49 , void
50 , void
50 , wai >= 2.1 && < 2.2
51 , wai >= 2.1 && < 2.2
51 , text
52 , text
53+ , streaming-commons
52 if flag(network-bytestring)
54 if flag(network-bytestring)
53 Build-Depends: network >= 2.2.1.5 && < 2.2.3
55 Build-Depends: network >= 2.2.1.5 && < 2.2.3
54 , network-bytestring >= 0.1.3 && < 0.1.4
56 , network-bytestring >= 0.1.3 && < 0.1.4
@@ -137,6 +139,8 @@ Test-Suite spec
137 , time
139 , time
138 , old-locale
140 , old-locale
139 , text
141 , text
142+ , conduit-extra
143+ , streaming-commons
140
144
141 if (os(linux) || os(freebsd) || os(darwin)) && flag(allow-sendfilefd)
145 if (os(linux) || os(freebsd) || os(darwin)) && flag(allow-sendfilefd)
142 Cpp-Options: -DSENDFILEFD
146 Cpp-Options: -DSENDFILEFD
@@ -155,6 +159,7 @@ Benchmark parser
155 , criterion
159 , criterion
156 , http-types
160 , http-types
157 , network
161 , network
162+ , network
158
163
159Source-Repository head
164Source-Repository head
160 Type: git
165 Type: git