packages feed

wai-app-file-cgi 0.7.0 → 0.7.1

raw patch · 4 files changed

+12/−9 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Network.Wai.Application.Classic: fileInfoDate :: FileInfo -> !ByteString
- Network.Wai.Application.Classic: FileInfo :: Path -> Integer -> HTTPDate -> FileInfo
+ Network.Wai.Application.Classic: FileInfo :: !Path -> !Integer -> !HTTPDate -> !ByteString -> FileInfo
- Network.Wai.Application.Classic: fileInfoName :: FileInfo -> Path
+ Network.Wai.Application.Classic: fileInfoName :: FileInfo -> !Path
- Network.Wai.Application.Classic: fileInfoSize :: FileInfo -> Integer
+ Network.Wai.Application.Classic: fileInfoSize :: FileInfo -> !Integer
- Network.Wai.Application.Classic: fileInfoTime :: FileInfo -> HTTPDate
+ Network.Wai.Application.Classic: fileInfoTime :: FileInfo -> !HTTPDate

Files

Network/Wai/Application/Classic/Field.hs view
@@ -80,12 +80,12 @@ addLength :: Integer -> ResponseHeaders -> ResponseHeaders addLength len hdr = (hContentLength, BS.pack (show len)) : hdr -newHeader :: Bool -> ByteString -> HTTPDate -> ResponseHeaders-newHeader ishtml file mtime+newHeader :: Bool -> ByteString -> ByteString -> ResponseHeaders+newHeader ishtml file date   | ishtml    = lastMod : textHtmlHeader   | otherwise = lastMod : (hContentType, mimeType file) : []   where-    lastMod = (hLastModified, formatHTTPDate mtime)+    lastMod = (hLastModified, date)  mimeType :: ByteString -> MimeType mimeType file =fromMaybe defaultMimeType . foldr1 mplus . map lok $ targets
Network/Wai/Application/Classic/File.hs view
@@ -124,7 +124,8 @@     let mtime = fileInfoTime finfo         size = fileInfoSize finfo         sfile = fileInfoName finfo-        hdr = newHeader ishtml (pathByteString file) mtime+        date = fileInfoDate finfo+        hdr = newHeader ishtml (pathByteString file) date         Just pst = ifmodified req size mtime -- never Nothing                <|> ifunmodified req size mtime                <|> ifrange req size mtime@@ -152,7 +153,8 @@     finfo <- liftIO $ (getFileInfo spec) (lang file)     let mtime = fileInfoTime finfo         size = fileInfoSize finfo-        hdr = newHeader ishtml (pathByteString file) mtime+        date = fileInfoDate finfo+        hdr = newHeader ishtml (pathByteString file) date         Just pst = ifmodified req size mtime -- never Nothing                <|> Just (Full ok200)     case pst of
Network/Wai/Application/Classic/Types.hs view
@@ -41,9 +41,10 @@   }  data FileInfo = FileInfo {-    fileInfoName :: Path-  , fileInfoSize :: Integer-  , fileInfoTime :: HTTPDate+    fileInfoName :: !Path+  , fileInfoSize :: !Integer+  , fileInfoTime :: !HTTPDate+  , fileInfoDate :: !ByteString   } deriving (Eq, Show)  data FileRoute = FileRoute {
wai-app-file-cgi.cabal view
@@ -1,5 +1,5 @@ Name:                   wai-app-file-cgi-Version:                0.7.0+Version:                0.7.1 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3