Fix a minor bug in timeout handling
commit3dd01eb724228ea66289474c2a2a7cd2a09fb40f
authorMichael Snoyman <michael@snoyman.com>
dateThu 19 Mar 2015, 19:28 (12 years ago)
parent72244b5
warp/ChangeLog.md+4
@@ -1,3 +1,7 @@
1+## 3.0.9.4
2+
3+* Fix [missing `IORef` tweak](https://github.com/yesodweb/wai/issues/351)
4+
15## 3.0.9.3
26
37* Don't serve a 416 status code for 0-length files [keter issue #75](https://github.com/snoyberg/keter/issues/75)
warp/Network/Wai/Handler/Warp/Request.hs+2−1
@@ -145,11 +145,12 @@ timeoutBody timeoutHandle rbody = do
145145 return $ do
146146 isFirst <- I.readIORef isFirstRef
147147
148− when isFirst $
148+ when isFirst $ do
149149 -- Timeout handling was paused after receiving the full request
150150 -- headers. Now we need to resume it to avoid a slowloris
151151 -- attack during request body sending.
152152 Timeout.resume timeoutHandle
153+ I.writeIORef isFirstRef False
153154
154155 bs <- rbody
155156
warp/warp.cabal+1−1
@@ -1,5 +1,5 @@
11Name: warp
2−Version: 3.0.9.3
2+Version: 3.0.9.4
33Synopsis: A fast, light-weight web server for WAI applications.
44License: MIT
55License-file: LICENSE