wai-app-static 3.0.0.6 → 3.0.1
raw patch · 4 files changed
+8/−6 lines, 4 filesdep ~warpPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: warp
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Network/Wai/Application/Static.hs +2/−2
- WaiAppStatic/CmdLine.hs +0/−2
- wai-app-static.cabal +2/−2
ChangeLog.md view
@@ -1,3 +1,7 @@+## 3.0.1++* Better HEAD support [#354](https://github.com/yesodweb/wai/issues/354)+ ## 3.0.0.6 Fix trailing slashes for `UrlMap` and other non-root setups [#325](https://github.com/yesodweb/wai/issues/325)
Network/Wai/Application/Static.hs view
@@ -214,10 +214,10 @@ staticAppPieces :: StaticSettings -> [Text] -> W.Application staticAppPieces _ _ req sendResponse- | W.requestMethod req /= "GET" = sendResponse $ W.responseLBS+ | notElem (W.requestMethod req) ["GET", "HEAD"] = sendResponse $ W.responseLBS H.status405 [("Content-Type", "text/plain")]- "Only GET is supported"+ "Only GET or HEAD is supported" staticAppPieces _ [".hidden", "folder.png"] _ sendResponse = sendResponse $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/folder.png")] staticAppPieces _ [".hidden", "haskell.png"] _ sendResponse = sendResponse $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/haskell.png")] staticAppPieces ss rawPieces req sendResponse = liftIO $ do
WaiAppStatic/CmdLine.hs view
@@ -14,7 +14,6 @@ import Text.Printf (printf) import System.Directory (canonicalizePath) import Control.Monad (unless)-import Network.Wai.Middleware.Autohead import Network.Wai.Middleware.RequestLogger (logStdout) import Network.Wai.Middleware.Gzip import qualified Data.Map as Map@@ -100,7 +99,6 @@ unless quiet $ printf "Serving directory %s on port %d with %s index files.\n" docroot' port (if noindex then "no" else show index) let middle = gzip def { gzipFiles = GzipCompress } . (if verbose then logStdout else id)- . autohead . (middleware args) runSettings defaultSettings { settingsPort = port
wai-app-static.cabal view
@@ -1,5 +1,5 @@ name: wai-app-static-version: 3.0.0.6+version: 3.0.1 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>@@ -53,7 +53,7 @@ , filepath , wai-extra >= 3.0 && < 3.1 , optparse-applicative >= 0.7- , warp >= 3.0 && < 3.1+ , warp >= 3.0.11 && < 3.1 -- Used exclusively for hashFile function , cryptohash-conduit