Bugfix - Caching redirect *only* for 301 redirects

Previous commit got it backwards.
This commit is contained in:
David L. L. Thomas 2012-11-25 11:12:39 -08:00
parent 246a024dce
commit 513d6ed4f9

View File

@ -526,7 +526,7 @@ runHandler handler mrender sroute tomr master sub upload log' =
[ Header "Cache-Control" "no-cache, must-revalidate"
, Header "Expires" "Thu, 01 Jan 1970 05:05:05 GMT"
]
hs = (if status == H.movedPermanently301 then disable_caching else [])
hs = (if status /= H.movedPermanently301 then disable_caching else [])
++ Header "Location" (encodeUtf8 loc) : appEndo headers []
return $ YARPlain
status hs typePlain emptyContent