diff --git a/yesod-core/Yesod/Handler.hs b/yesod-core/Yesod/Handler.hs index 651ac200..9a952752 100644 --- a/yesod-core/Yesod/Handler.hs +++ b/yesod-core/Yesod/Handler.hs @@ -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