packages feed

yesod-core 1.6.18.8 → 1.6.19.0

raw patch · 3 files changed

+12/−7 lines, 3 files

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # ChangeLog for yesod-core +## 1.6.19.0++* Change order of priority in `languages`[#1721](https://github.com/yesodweb/yesod/pull/1721)+ ## 1.6.18.8  * Fix test suite for wai-extra change around vary header
src/Yesod/Core/Handler.hs view
@@ -1226,10 +1226,10 @@ -- Languages are determined based on the following (in descending order -- of preference): ----- * The _LANG user session variable.--- -- * The _LANG get parameter. --+-- * The _LANG user session variable.+-- -- * The _LANG cookie. -- -- * Accept-Language HTTP header.@@ -1238,11 +1238,12 @@ -- If a matching language is not found the default language will be used. -- -- This is handled by parseWaiRequest (not exposed).+--+-- __NOTE__: Before version @1.6.19.0@, this function prioritized the session+-- variable above all other sources.+-- languages :: MonadHandler m => m [Text]-languages = do-    mlang <- lookupSession langKey-    langs <- reqLangs <$> getRequest-    return $ maybe id (:) mlang langs+languages = reqLangs <$> getRequest  lookup' :: Eq a => a -> [(a, b)] -> [b] lookup' a = map snd . filter (\x -> a == fst x)
yesod-core.cabal view
@@ -1,5 +1,5 @@ name:            yesod-core-version:         1.6.18.8+version:         1.6.19.0 license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>