packages feed

scgi 0.3.2 → 0.3.3

raw patch · 2 files changed

+13/−5 lines, 2 filesdep −network-bytestringdep ~network

Dependencies removed: network-bytestring

Dependency ranges changed: network

Files

scgi.cabal view
@@ -1,7 +1,10 @@ Name:                scgi-Version:             0.3.2+Version:             0.3.3 Stability:           alpha Description:+  THIS LIBRARY IS DEPRECATED. For new applications, please use WAI+  - see <http://hackage.haskell.org/package/wai>.+  .   This library lets you write SCGI programs. This package reuses the   cgi package API, making it very easy to port CGI programs to SCGI. License:             BSD3@@ -18,8 +21,8 @@     location: http://code.haskell.org/scgi/  library-  build-depends:     base >= 3 && < 5, bytestring, cgi, network,-      network-bytestring, extensible-exceptions >= 0.1 && < 0.2+  build-depends:     base >= 3 && < 5, bytestring, cgi, network >= 2.2.3,+      extensible-exceptions >= 0.1 && < 0.2   exposed-modules:   Network.SCGI   ghc-options:       -Wall -fno-warn-name-shadowing -fno-warn-unused-matches                      -fno-warn-missing-signatures -fno-warn-orphans
src/Network/SCGI.hs view
@@ -71,12 +71,17 @@ stopAtNothing (Just a:xs) = a:stopAtNothing xs stopAtNothing [] = [] +-- | This function replaces Data.ByteString.hGetContents, because the latter is+-- now (on GHC 6.10.4 and GHC 6.12.2, and network-2.2.1.7) acting in such a way+-- that when a block is received over the TCP connection, it is not immediately+-- delivered.  This causes the SCGI server to stall.  I don't know when this+-- behaviour changed. lazyContents :: Socket -> IO (ThreadId, L.ByteString) lazyContents s = do     ch <- newChan-    tid <- forkIO $ forever $ do+    tid <- forkIO $ (forever $ do         blk <- NSB.recv s 16384-        writeChan ch (Just blk)+        writeChan ch (Just blk))       `finally`         writeChan ch Nothing     blks <- getChanContents ch