[wai-extra] Set `requestBodyLength` to the actual length of the post body
commit699de9736fc256892d9e1d1cb6da7333d735a667
authorJeroen Bransen <jeroen@chordify.net>
dateMon 20 Nov 2017, 15:41 (9 years ago)
parente900d88
wai-extra/ChangeLog.md+1−1
@@ -1,6 +1,6 @@
11## 3.0.20.1
22
3−* Set `ChunkedBody` for `srequest` [#654](https://github.com/yesodweb/wai/pull/654)
3+* Set `requestBodyLength` for `srequest` [#654](https://github.com/yesodweb/wai/pull/654)
44
55## 3.0.20.0
66
wai-extra/Network/Wai/Test.hs+1−1
@@ -176,7 +176,7 @@ srequest (SRequest req bod) = do
176176 case bss of
177177 [] -> ([], S.empty)
178178 x:y -> (y, x)
179− , requestBodyLength = ChunkedBody
179+ , requestBodyLength = KnownLength $ fromIntegral $ L.length bod
180180 }
181181 req'' <- addCookiesToRequest req'
182182 response <- liftIO $ do