on master help sign in
Using vocal status.
97bd889Kazu Yamamoto
warp/Network/Wai/Handler/Warp/Response.hs+2−2
@@ -279,11 +279,11 @@ sendRsp conn ii ver s0 hs0 (RspFile path mPart mRange isHead hook) = do
279 connSendFile conn fid beg len hook' [lheader]
279 connSendFile conn fid beg len hook' [lheader]
280 return (Just s, Just len)
280 return (Just s, Just len)
281 | otherwise -> do
281 | otherwise -> do
282− sendRsp conn ii ver H.status416
282+ sendRsp conn ii ver H.requestedRangeNotSatisfiable416
283 (filter (\(k, _) -> k /= "content-length") hs)
283 (filter (\(k, _) -> k /= "content-length") hs)
284 (RspBuilder mempty True)
284 (RspBuilder mempty True)
285 where
285 where
286− s2 = H.status404
286+ s2 = H.notFound404
287 hs2 = replaceHeader H.hContentType "text/plain; charset=utf-8" hs0
287 hs2 = replaceHeader H.hContentType "text/plain; charset=utf-8" hs0
288 body = byteString "File not found"
288 body = byteString "File not found"
289 mfdc = fdCacher ii
289 mfdc = fdCacher ii