@@ -57,7 +57,7 @@ main = hspecX $ do
5757
5858
5959 let cacheLookup = MaxAgeForever -- (\fp h -> fp == "tests/runtests.hs" && h == "cached")
60− let statApp = flip runSession $ staticApp defaultWebAppSettings -- cacheLookup) {ssFolder = "tests"}
60+ let statApp = flip runSession $ staticApp defaultFileServerSettings {ssFolder = fileSystemLookup "tests"}
6161 describe "staticApp" $ do
6262 it "403 for unsafe paths" $ statApp $
6363 flip mapM_ ["..", "."] $ \path ->
@@ -87,9 +87,9 @@ main = hspecX $ do
8787 assertStatus 301 req
8888 assertHeader "Location" "../../a/b/c" req
8989
90− let absoluteApp = flip runSession $ staticApp $ defaultWebAppSettings -- cacheLookup) {
91− -- ssFolder = "tests", ssMkRedirect = \_ u -> S8.append "http://www.example.com" u
92− -- }
90+ let absoluteApp = flip runSession $ staticApp $ defaultWebAppSettings {
91+ ssFolder = fileSystemLookup "tests", ssMkRedirect = \_ u -> S8.append "http://www.example.com" u
92+ }
9393 it "301 redirect when multiple slashes" $ absoluteApp $
9494 flip mapM_ ["/a//b/c", "a//b/c"] $ \path -> do
9595 req <- request (setRawPathInfo defRequest path)
@@ -124,7 +124,7 @@ main = hspecX $ do
124124 assertStatus 304 req
125125 assertNoHeader "Cache-Control" req
126126
127− let pubApp = flip runSession $ staticApp defaultWebAppSettings -- $ ETag (\_ -> return $ Just "hash")) {ssFolder = "tests"}
127+ let pubApp = flip runSession $ staticApp defaultWebAppSettings {ssFolder = fileSystemLookup "tests"}
128128 describe "staticApp when requesting a public asset - etags" $ do
129129 it "200 when no etag parameters" $ pubApp $ do
130130 req <- request (setRawPathInfo defRequest "runtests.hs")