wai-app-static 3.1.6.1 → 3.1.6.2
raw patch · 7 files changed
+16/−14 lines, 7 filesdep −blaze-builderdep ~bytestringPVP ok
version bump matches the API change (PVP)
Dependencies removed: blaze-builder
Dependency ranges changed: bytestring
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Network/Wai/Application/Static.hs +2/−2
- WaiAppStatic/Listing.hs +1/−1
- WaiAppStatic/Storage/Embedded/Runtime.hs +3/−3
- WaiAppStatic/Storage/Embedded/TH.hs +2/−2
- WaiAppStatic/Types.hs +1/−2
- wai-app-static.cabal +3/−4
ChangeLog.md view
@@ -1,3 +1,7 @@+## 3.1.6.2++* Drop dependency on blaze-builder+ ## 3.1.6.1 * Add `<>` import
Network/Wai/Application/Static.hs view
@@ -34,7 +34,7 @@ import Data.ByteString.Lazy.Char8 () import Control.Monad.IO.Class (liftIO) -import Blaze.ByteString.Builder (toByteString)+import Data.ByteString.Builder (toLazyByteString) import Data.FileEmbed (embedFile) @@ -262,7 +262,7 @@ ] lbs response (Redirect pieces' mHash) = do- let loc = (ssMkRedirect ss) pieces' $ toByteString (H.encodePathSegments $ map fromPiece pieces')+ let loc = ssMkRedirect ss pieces' $ L.toStrict $ toLazyByteString (H.encodePathSegments $ map fromPiece pieces') let qString = case mHash of Just hash -> replace "etag" (Just hash) (W.queryString req) Nothing -> remove "etag" (W.queryString req)
WaiAppStatic/Listing.hs view
@@ -22,7 +22,7 @@ -- | Provides a default directory listing, suitable for most apps. ----- Code below taken from Happstack: <http://patch-tag.com/r/mae/happstack/snapshot/current/content/pretty/happstack-server/src/Happstack/Server/FileServe/BuildingBlocks.hs>+-- Code below taken from Happstack: <https://github.com/Happstack/happstack-server/blob/87e6c01a65c687d06c61345430a112fc9a444a95/src/Happstack/Server/FileServe/BuildingBlocks.hs> defaultListing :: Listing defaultListing pieces (Folder contents) = do let isTop = null pieces || map Just pieces == [toPiece ""]
WaiAppStatic/Storage/Embedded/Runtime.hs view
@@ -8,7 +8,7 @@ import Data.ByteString (ByteString) import Control.Arrow ((&&&), second) import Data.List-import Blaze.ByteString.Builder (fromByteString)+import Data.ByteString.Builder (byteString) import qualified Network.Wai as W import qualified Data.Map as Map import Data.Function (on)@@ -50,7 +50,7 @@ toEntry (name, EEFolder{}) = Left name toEntry (name, EEFile bs) = Right File { fileGetSize = fromIntegral $ S.length bs- , fileToResponse = \s h -> W.responseBuilder s h $ fromByteString bs+ , fileToResponse = \s h -> W.responseBuilder s h $ byteString bs , fileName = name , fileGetHash = return $ Just $ runHash bs , fileGetModified = Nothing@@ -87,7 +87,7 @@ bsToFile :: Piece -> ByteString -> File bsToFile name bs = File { fileGetSize = fromIntegral $ S.length bs- , fileToResponse = \s h -> W.responseBuilder s h $ fromByteString bs+ , fileToResponse = \s h -> W.responseBuilder s h $ byteString bs , fileName = name , fileGetHash = return $ Just $ runHash bs , fileGetModified = Nothing
WaiAppStatic/Storage/Embedded/TH.hs view
@@ -5,7 +5,7 @@ , mkSettings ) where -import Blaze.ByteString.Builder.ByteString (insertByteString)+import Data.ByteString.Builder.Extra (byteStringInsert) import Codec.Compression.GZip (compress) import Control.Applicative import Data.ByteString.Unsafe (unsafePackAddressLen)@@ -130,7 +130,7 @@ let h' = if embCompressed entry then h ++ [("Content-Encoding", "gzip")] else h- in W.responseBuilder s h' $ insertByteString $ embContent entry+ in W.responseBuilder s h' $ byteStringInsert $ embContent entry -- Usually the fileName should just be the filename not the entire path, -- but we need the whole path to make the lookup within lookupMime
WaiAppStatic/Types.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE OverloadedStrings #-} module WaiAppStatic.Types ( -- * Pieces Piece@@ -25,7 +24,7 @@ import Data.ByteString (ByteString) import System.Posix.Types (EpochTime) import qualified Data.Text as T-import Blaze.ByteString.Builder (Builder)+import Data.ByteString.Builder (Builder) import Network.Mime (MimeType) -- | An individual component of a path, or of a filepath.
wai-app-static.cabal view
@@ -1,5 +1,5 @@ name: wai-app-static-version: 3.1.6.1+version: 3.1.6.2 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>@@ -27,7 +27,7 @@ library build-depends: base >= 4 && < 5 , wai >= 3.0 && < 3.3- , bytestring >= 0.9.1.4+ , bytestring >= 0.10.4 , http-types >= 0.7 , transformers >= 0.2.2 , unix-compat >= 0.2@@ -37,7 +37,6 @@ , old-locale >= 1.0.0.2 , file-embed >= 0.0.3.1 , text >= 0.7- , blaze-builder >= 0.2.1.4 , cryptonite >= 0.6 , memory >= 0.7 , http-date@@ -74,7 +73,7 @@ , wai-app-static , directory >= 1.0 , containers >= 0.2- , bytestring >= 0.9.1.4+ , bytestring >= 0.10.4 , text >= 0.7 , mime-types >= 0.1 && < 0.2