1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 21:50:50 +00:00

update session fix

This commit is contained in:
astaxie 2013-05-08 11:07:55 +08:00
parent 6d96345499
commit bf144d5835

View File

@ -71,6 +71,8 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se
r.AddCookie(&cookie)
} else {
cookie.Expires = time.Now().Add(time.Duration(manager.maxlifetime) * time.Second)
cookie.HttpOnly = true
cookie.Path = "/"
http.SetCookie(w, cookie)
sid, _ := url.QueryUnescape(cookie.Value)
session, _ = manager.provider.SessionRead(sid)