wai-app-static 3.1.6.3 → 3.1.7
raw patch · 4 files changed
+13/−7 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +6/−0
- Network/Wai/Application/Static.hs +3/−3
- test/WaiAppStaticTest.hs +1/−1
- wai-app-static.cabal +3/−3
ChangeLog.md view
@@ -1,3 +1,9 @@+# wai-app-static changelog++## 3.1.7++* Use 302 instead of 301 redirect, to avoid caching the presence of an index.html file+ ## 3.1.6.3 * The executable warp obeys `-h` option properly for host
Network/Wai/Application/Static.hs view
@@ -167,7 +167,7 @@ -- Note: It would be arguably better to next check -- if-modified-since and return a 304 if that indicates a match as -- well. However, the circumstances under which such a situation- -- could arise would be very anomolous, and should likely warrant a+ -- could arise would be very anomalous, and should likely warrant a -- new file being sent anyway. (Just hash, _) -> respond [("ETag", hash)] @@ -267,13 +267,13 @@ Just hash -> replace "etag" (Just hash) (W.queryString req) Nothing -> remove "etag" (W.queryString req) - sendResponse $ W.responseLBS H.status301+ sendResponse $ W.responseLBS H.status302 [ ("Content-Type", "text/plain") , ("Location", S8.append loc $ H.renderQuery True qString) ] "Redirect" response (RawRedirect path) =- sendResponse $ W.responseLBS H.status301+ sendResponse $ W.responseLBS H.status302 [ ("Content-Type", "text/plain") , ("Location", path) ] "Redirect"
test/WaiAppStaticTest.hs view
@@ -57,7 +57,7 @@ assertStatus 200 =<< request (setRawPathInfo defRequest path) - it "404 for non-existant files" $ webApp $+ it "404 for non-existent files" $ webApp $ assertStatus 404 =<< request (setRawPathInfo defRequest "doesNotExist")
wai-app-static.cabal view
@@ -1,5 +1,5 @@ name: wai-app-static-version: 3.1.6.3+version: 3.1.7 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>@@ -49,7 +49,7 @@ , filepath , wai-extra >= 3.0 && < 3.1 , optparse-applicative >= 0.7- , warp >= 3.0.11 && < 3.3+ , warp >= 3.0.11 && < 3.4 exposed-modules: Network.Wai.Application.Static WaiAppStatic.Storage.Filesystem@@ -102,7 +102,7 @@ , temporary , mockery -- , containers- ghc-options: -Wall+ ghc-options: -Wall source-repository head type: git