on master help sign in
fixing large body in HTTP/2.
commit1ca89924553f56f00abc6cc6dbb39e87f0a32735 authorKazu Yamamoto <kazu@iij.ad.jp> dateFri 27 Apr 2018, 13:05 (8 years ago) parent81aa07b
1 file changed+9−3
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs+9−3
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs+9−3
@@ -246,9 +246,15 @@ worker ctx@Context{inputQ,controlQ} set app responder tm = do
246246 setStreamInfo sinfo inp
247247 T.resume th
248248 T.tickle th
249− let ii' = ii { threadHandle = th }
250− vaultValue = Vault.insert pauseTimeoutKey (Timeout.pause th) $ vault req
251− req' = req { vault = vaultValue }
249+ let !ii' = ii { threadHandle = th }
250+ !body = requestBody req
251+ !body' = do
252+ T.pause th
253+ bs <- body
254+ T.resume th
255+ return bs
256+ !vaultValue = Vault.insert pauseTimeoutKey (Timeout.pause th) $ vault req
257+ !req' = req { vault = vaultValue, requestBody = body' }
252258 app req' $ responder ii' reqvt tcont strm req'
253259 cont1 <- case ex of
254260 Right ResponseReceived -> return True