diff --git a/warp/ChangeLog.md b/warp/ChangeLog.md index 6c19dc736..ea86e938e 100644 --- a/warp/ChangeLog.md +++ b/warp/ChangeLog.md @@ -1,3 +1,7 @@ +## 3.0.9.3 + +* Don't serve a 416 status code for 0-length files [keter issue #75](https://github.com/snoyberg/keter/issues/75) + ## 3.0.9.2 Fix support for old versions of bytestring diff --git a/warp/Network/Wai/Handler/Warp/Response.hs b/warp/Network/Wai/Handler/Warp/Response.hs index fe899a119..9fc762321 100644 --- a/warp/Network/Wai/Handler/Warp/Response.hs +++ b/warp/Network/Wai/Handler/Warp/Response.hs @@ -226,7 +226,7 @@ sendRsp conn ver s0 hs0 (RspFile path mPart mRange hook) = do print _ex >> #endif sendRsp conn ver s2 hs2 (RspBuilder body True) - Right (s, hs1, beg, len) | len > 0 -> do + Right (s, hs1, beg, len) | len >= 0 -> do lheader <- composeHeader ver s hs1 connSendFile conn path beg len hook [lheader] | otherwise -> do diff --git a/warp/warp.cabal b/warp/warp.cabal index 857397d6e..40b4f7ce8 100644 --- a/warp/warp.cabal +++ b/warp/warp.cabal @@ -1,5 +1,5 @@ Name: warp -Version: 3.0.9.2 +Version: 3.0.9.3 Synopsis: A fast, light-weight web server for WAI applications. License: MIT License-file: LICENSE