on master help sign in
Replace 301 with 302 for redirects
commit374aaac6d3cd1c0a054723e0d4011bc319a29ea7 authorMichael Snoyman <michael@snoyman.com> dateWed 15 Jan 2020, 07:44 (7 years ago) parent96d9726
3 files changed+9−3
wai-app-static/ChangeLog.md+6 wai-app-static/Network/Wai/Application/Static.hs+2−2 wai-app-static/wai-app-static.cabal+1−1
wai-app-static/ChangeLog.md+6
@@ -1,3 +1,9 @@
1+# wai-app-static changelog
2+
3+## 3.1.7
4+
5+* Use 302 instead of 301 redirect, to avoid caching the presence of an index.html file
6+
17## 3.1.6.3
28
39* The executable warp obeys `-h` option properly for host
wai-app-static/Network/Wai/Application/Static.hs+2−2
@@ -267,13 +267,13 @@ staticAppPieces ss rawPieces req sendResponse = liftIO $ do
267267 Just hash -> replace "etag" (Just hash) (W.queryString req)
268268 Nothing -> remove "etag" (W.queryString req)
269269
270− sendResponse $ W.responseLBS H.status301
270+ sendResponse $ W.responseLBS H.status302
271271 [ ("Content-Type", "text/plain")
272272 , ("Location", S8.append loc $ H.renderQuery True qString)
273273 ] "Redirect"
274274
275275 response (RawRedirect path) =
276− sendResponse $ W.responseLBS H.status301
276+ sendResponse $ W.responseLBS H.status302
277277 [ ("Content-Type", "text/plain")
278278 , ("Location", path)
279279 ] "Redirect"
wai-app-static/wai-app-static.cabal+1−1
@@ -1,5 +1,5 @@
11name: wai-app-static
2−version: 3.1.6.3
2+version: 3.1.7
33license: MIT
44license-file: LICENSE
55author: Michael Snoyman <michael@snoyman.com>