Skip to content

Commit

Permalink
bug fix of hasBody.
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Sep 19, 2012
1 parent d9b0558 commit 41f01b1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions warp/Network/Wai/Handler/Warp/Response.hs
Expand Up @@ -173,10 +173,13 @@ checkLength = lookup H.hContentLength
----------------------------------------------------------------

hasBody :: H.Status -> Request -> Bool
hasBody s req = s /= H.Status 204 ""
&& s /= H.status304
&& H.statusCode s >= 200
&& requestMethod req /= H.methodHead
hasBody s req = sc /= 204
&& sc /= 304
&& sc >= 200
&& method /= H.methodHead
where
sc = H.statusCode s
method = requestMethod req

----------------------------------------------------------------

Expand Down

0 comments on commit 41f01b1

Please sign in to comment.