diff --git a/Network/Wai/Handler/WarpTLS.hs b/Network/Wai/Handler/WarpTLS.hs
--- a/Network/Wai/Handler/WarpTLS.hs
+++ b/Network/Wai/Handler/WarpTLS.hs
@@ -38,6 +38,7 @@
 import Crypto.Random.API (getSystemRandomGen)
 import Control.Exception (Exception, throwIO)
 import Data.Typeable (Typeable)
+import qualified Data.Conduit.Binary as CB
 
 data TLSSettings = TLSSettings
     { certFile :: FilePath
@@ -104,7 +105,7 @@
                             { TLS.backendFlush = return ()
                             , TLS.backendClose = return ()
                             , TLS.backendSend = \bs -> C.yield bs C.$$ toClient
-                            , TLS.backendRecv = getNext . takeMost
+                            , TLS.backendRecv = getNext . fmap (B.concat . L.toChunks) . CB.take
                             }
                         params
                         gen
@@ -177,13 +178,3 @@
     where parseKey (Right pems) = map (fmap (TLS.PrivRSA . snd) . KeyRSA.decodePrivate . L.fromChunks . (:[]) . PEM.pemContent)
                                 $ filter ((== "RSA PRIVATE KEY") . PEM.pemName) pems
           parseKey (Left err) = error $ "Cannot parse PEM file: " ++ err
-
-takeMost :: Monad m => Int -> C.Sink B.ByteString m B.ByteString
-takeMost i =
-    C.await >>= maybe (return B.empty) go
-  where
-    go bs = do
-        unless (B.null y) $ C.leftover y
-        return x
-      where
-        (x, y) = B.splitAt i bs
diff --git a/warp-tls.cabal b/warp-tls.cabal
--- a/warp-tls.cabal
+++ b/warp-tls.cabal
@@ -1,5 +1,5 @@
 Name:                warp-tls
-Version:             1.4.0
+Version:             1.4.0.1
 Synopsis:            SSL support for Warp via the TLS package
 License:             MIT
 License-file:        LICENSE
