X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=Network%2FHTTP%2FLucu%2FStaticFile.hs;h=5b0ce579ed66e41bc0c1e1d926588743e05468ae;hb=f62b6f07bbf1eefcf552163d8f7daa6e0862ed5d;hp=608d608169dfa0bdcffbf24a1e600ef6baa8a1c3;hpb=b0efa668bb881d1c9db4b852b1b9063a2db12b3d;p=Lucu.git diff --git a/Network/HTTP/Lucu/StaticFile.hs b/Network/HTTP/Lucu/StaticFile.hs index 608d608..5b0ce57 100644 --- a/Network/HTTP/Lucu/StaticFile.hs +++ b/Network/HTTP/Lucu/StaticFile.hs @@ -64,7 +64,7 @@ handleStaticFile path $ abort Forbidden [] Nothing -- 讀める tag <- liftIO $ generateETagFromFile path - lastMod <- return $ posixSecondsToUTCTime $ fromRational $ toRational $ modificationTime stat + let lastMod = posixSecondsToUTCTime $ fromRational $ toRational $ modificationTime stat foundEntity tag lastMod -- MIME Type を推定 @@ -74,7 +74,7 @@ handleStaticFile path Just mime -> setContentType mime -- 實際にファイルを讀んで送る - (liftIO $ B.readFile path) >>= outputLBS + liftIO (B.readFile path) >>= outputLBS else abort Forbidden [] Nothing else