on master help sign in
Minor ssRedirectToIndex fixes
commit3fa4f761c5b037d2ff6c202c67c4b28a83e73105 authorMichael Snoyman <michael@snoyman.com> dateMon 20 Feb 2012, 21:36 (15 years ago) parente54e9ad
4 files changed+5−3
wai-app-static/Network/Wai/Application/Static.hs+1 wai-app-static/wai-app-static.cabal+1−1 warp-static/warp-static.cabal+1−1 warp-static/warp.hs+2−1
wai-app-static/Network/Wai/Application/Static.hs+1
@@ -16,6 +16,7 @@ module Network.Wai.Application.Static
1616 , ssListing
1717 , ssIndices
1818 , ssMaxAge
19+ , ssRedirectToIndex
1920 -- * Generic, non-WAI code
2021 -- ** Mime types
2122 , MimeType
wai-app-static/wai-app-static.cabal+1−1
@@ -1,5 +1,5 @@
11name: wai-app-static
2−version: 1.1.1.1
2+version: 1.1.2
33license: BSD3
44license-file: LICENSE
55author: Michael Snoyman <michael@snoyman.com>
warp-static/warp-static.cabal+1−1
@@ -16,7 +16,7 @@ Executable warp
1616 Main-is: warp.hs
1717 Build-depends: base >= 4 && < 5
1818 , warp >= 1.1 && < 1.2
19− , wai-app-static >= 1.1 && < 1.2
19+ , wai-app-static >= 1.1.2 && < 1.2
2020 , wai-extra >= 1.1 && < 1.2
2121 , cmdargs >= 0.6.7
2222 , directory >= 1.0
warp-static/warp.hs+2−1
@@ -4,6 +4,7 @@ import Network.Wai.Application.Static
44 , defaultMimeTypes, mimeTypeByExt
55 , defaultFileServerSettings, fileSystemLookup
66 , fileName, toFilePath
7+ , ssRedirectToIndex
78 )
89import Network.Wai.Handler.Warp
910 ( runSettings, defaultSettings, settingsHost, settingsPort
@@ -52,7 +53,7 @@ main = do
5253 } $ middle $ staticApp defaultFileServerSettings
5354 { ssFolder = fileSystemLookup $ toFilePath docroot
5455 , ssIndices = if noindex then [] else map pack index
55− , ssRedirectToIndex = false
56+ , ssRedirectToIndex = False
5657 , ssListing = Just defaultListing
5758 , ssGetMimeType = return . mimeTypeByExt mimeMap defaultMimeType . fileName
5859 }