Merge branch 'master' of github.com:yesodweb/yesod

This commit is contained in:
Michael Snoyman 2016-08-14 15:43:55 +03:00
commit 10b8ee70e7
2 changed files with 6 additions and 2 deletions

View File

@ -724,7 +724,11 @@ invalidArgsI msg = do
-- | Set the cookie on the client. -- | Set the cookie on the client.
setCookie :: MonadHandler m => SetCookie -> m () setCookie :: MonadHandler m => SetCookie -> m ()
setCookie = addHeaderInternal . AddCookie setCookie sc = do
addHeaderInternal (DeleteCookie name path)
addHeaderInternal (AddCookie sc)
where name = setCookieName sc
path = maybe "/" id (setCookiePath sc)
-- | Helper function for setCookieExpires value -- | Helper function for setCookieExpires value
getExpires :: MonadIO m getExpires :: MonadIO m