on master help sign in
using list comprehension.
commit70684aee012c6dd6114e647cbc1f30b7e9343f57 authorKazu Yamamoto <kazu@iij.ad.jp> dateWed 29 Jan 2020, 08:24 (7 years ago) parentb770f76
1 file changed+1−3
warp/Network/Wai/Handler/Warp/File.hs+1−3
warp/Network/Wai/Handler/Warp/File.hs+1−3
@@ -42,9 +42,7 @@ conditionalRequest finfo hs0 rspidx reqidx = case condition of
4242 nobody@(WithoutBody _) -> nobody
4343 WithBody s _ off len -> let !hs1 = addContentHeaders hs0 off len size
4444 !hasLM = isJust $ rspidx ! fromEnum ResLastModified
45− !hs
46− | hasLM = hs1
47− | otherwise = (H.hLastModified,date) : hs1
45+ !hs = [ (H.hLastModified,date) | not hasLM ] ++ hs1
4846 in WithBody s hs off len
4947 where
5048 !mtime = I.fileInfoTime finfo