@@ -40,6 +40,7 @@ import qualified Web.Encodings.StringLike as SL
4040import qualified Safe
4141import Network.Socket.SendFile
4242import Control.Arrow (first)
43+import Data.ByteString.Lazy.Internal (defaultChunkSize)
4344
4445run :: Port -> Application -> IO ()
4546run port = withSocketsDo .
@@ -138,8 +139,7 @@ requestBodyHandle :: Handle -> MVar Int -> Enumerator a
138139requestBodyHandle h mlen iter accum = modifyMVar mlen (helper accum) where
139140 helper a 0 = return (0, Right a)
140141 helper a len = do
141− let maxChunkSize = 1024
142− bs <- BS.hGet h $ min len maxChunkSize
142+ bs <- BS.hGet h $ min len defaultChunkSize
143143 let newLen = len - BS.length bs
144144 ea' <- iter a bs
145145 case ea' of