Skip to content

Commit

Permalink
Don't serve a 416 status code for 0-length files
Browse files Browse the repository at this point in the history
keter issue #75 (snoyberg/keter#75)
  • Loading branch information
snoyberg committed Mar 8, 2015
1 parent b122ce5 commit f1f658b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion warp/Network/Wai/Handler/Warp/Response.hs
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down

0 comments on commit f1f658b

Please sign in to comment.