on master help sign in
Fix a minor bug in timeout handling
3dd01ebMichael Snoyman
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+
1## 3.0.9.3
5## 3.0.9.3
2
6
3* Don't serve a 416 status code for 0-length files [keter issue #75](https://github.com/snoyberg/keter/issues/75)
7* 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
145 return $ do
145 return $ do
146 isFirst <- I.readIORef isFirstRef
146 isFirst <- I.readIORef isFirstRef
147
147
148− when isFirst $
148+ when isFirst $ do
149 -- Timeout handling was paused after receiving the full request
149 -- Timeout handling was paused after receiving the full request
150 -- headers. Now we need to resume it to avoid a slowloris
150 -- headers. Now we need to resume it to avoid a slowloris
151 -- attack during request body sending.
151 -- attack during request body sending.
152 Timeout.resume timeoutHandle
152 Timeout.resume timeoutHandle
153+ I.writeIORef isFirstRef False
153
154
154 bs <- rbody
155 bs <- rbody
155
156
warp/warp.cabal+1−1
@@ -1,5 +1,5 @@
1Name: warp
1Name: warp
2−Version: 3.0.9.3
2+Version: 3.0.9.4
3Synopsis: A fast, light-weight web server for WAI applications.
3Synopsis: A fast, light-weight web server for WAI applications.
4License: MIT
4License: MIT
5License-file: LICENSE
5License-file: LICENSE