on master help sign in
bug fix of hasBody.
commit41f01b163332de0eea0c686a31b71349bb598355 authorKazu Yamamoto <kazu@iij.ad.jp> dateFri 17 Aug 2012, 16:46 (14 years ago) parentd9b0558
1 file changed+7−4
warp/Network/Wai/Handler/Warp/Response.hs+7−4
warp/Network/Wai/Handler/Warp/Response.hs+7−4
@@ -173,10 +173,13 @@ checkLength = lookup H.hContentLength
173173----------------------------------------------------------------
174174
175175hasBody :: H.Status -> Request -> Bool
176−hasBody s req = s /= H.Status 204 ""
177− && s /= H.status304
178− && H.statusCode s >= 200
179− && requestMethod req /= H.methodHead
176+hasBody s req = sc /= 204
177+ && sc /= 304
178+ && sc >= 200
179+ && method /= H.methodHead
180+ where
181+ sc = H.statusCode s
182+ method = requestMethod req
180183
181184----------------------------------------------------------------
182185