@@ -57,7 +57,7 @@ main = hspecX $ do
59 let cacheLookup = MaxAgeForever -- (\fp h -> fp == "tests/runtests.hs" && h == "cached")
59 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"}
61 describe "staticApp" $ do
61 describe "staticApp" $ do
62 it "403 for unsafe paths" $ statApp $
62 it "403 for unsafe paths" $ statApp $
63 flip mapM_ ["..", "."] $ \path ->
63 flip mapM_ ["..", "."] $ \path ->
@@ -87,9 +87,9 @@ main = hspecX $ do
87 assertStatus 301 req
87 assertStatus 301 req
88 assertHeader "Location" "../../a/b/c" req
88 assertHeader "Location" "../../a/b/c" req
90− let absoluteApp = flip runSession $ staticApp $ defaultWebAppSettings -- cacheLookup) {
90+ let absoluteApp = flip runSession $ staticApp $ defaultWebAppSettings {
91− -- ssFolder = "tests", ssMkRedirect = \_ u -> S8.append "http://www.example.com" u
91+ ssFolder = fileSystemLookup "tests", ssMkRedirect = \_ u -> S8.append "http://www.example.com" u
93 it "301 redirect when multiple slashes" $ absoluteApp $
93 it "301 redirect when multiple slashes" $ absoluteApp $
94 flip mapM_ ["/a//b/c", "a//b/c"] $ \path -> do
94 flip mapM_ ["/a//b/c", "a//b/c"] $ \path -> do
95 req <- request (setRawPathInfo defRequest path)
95 req <- request (setRawPathInfo defRequest path)
@@ -124,7 +124,7 @@ main = hspecX $ do
124 assertStatus 304 req
124 assertStatus 304 req
125 assertNoHeader "Cache-Control" req
125 assertNoHeader "Cache-Control" req
127− let pubApp = flip runSession $ staticApp defaultWebAppSettings -- $ ETag (\_ -> return $ Just "hash")) {ssFolder = "tests"}
127+ let pubApp = flip runSession $ staticApp defaultWebAppSettings {ssFolder = fileSystemLookup "tests"}
128 describe "staticApp when requesting a public asset - etags" $ do
128 describe "staticApp when requesting a public asset - etags" $ do
129 it "200 when no etag parameters" $ pubApp $ do
129 it "200 when no etag parameters" $ pubApp $ do
130 req <- request (setRawPathInfo defRequest "runtests.hs")
130 req <- request (setRawPathInfo defRequest "runtests.hs")