From 699de9736fc256892d9e1d1cb6da7333d735a667 Mon Sep 17 00:00:00 2001 From: Jeroen Bransen Date: Mon, 20 Nov 2017 15:41:25 +0100 Subject: [PATCH] [wai-extra] Set `requestBodyLength` to the actual length of the post body --- wai-extra/ChangeLog.md | 2 +- wai-extra/Network/Wai/Test.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wai-extra/ChangeLog.md b/wai-extra/ChangeLog.md index 347e94e2..c041fa60 100644 --- a/wai-extra/ChangeLog.md +++ b/wai-extra/ChangeLog.md @@ -1,6 +1,6 @@ ## 3.0.20.1 -* Set `ChunkedBody` for `srequest` [#654](https://github.com/yesodweb/wai/pull/654) +* Set `requestBodyLength` for `srequest` [#654](https://github.com/yesodweb/wai/pull/654) ## 3.0.20.0 diff --git a/wai-extra/Network/Wai/Test.hs b/wai-extra/Network/Wai/Test.hs index 46f8d408..6d058190 100644 --- a/wai-extra/Network/Wai/Test.hs +++ b/wai-extra/Network/Wai/Test.hs @@ -176,7 +176,7 @@ srequest (SRequest req bod) = do case bss of [] -> ([], S.empty) x:y -> (y, x) - , requestBodyLength = ChunkedBody + , requestBodyLength = KnownLength $ fromIntegral $ L.length bod } req'' <- addCookiesToRequest req' response <- liftIO $ do