1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-12 00:01:02 +00:00

fix SessionRegenerateID should release old SessionStore and release new SessionStore in router.go

This commit is contained in:
slene
2014-01-11 17:01:33 +08:00
parent 3b99f37aa1
commit 6e9ba0ea7f
2 changed files with 5 additions and 2 deletions

View File

@ -165,7 +165,7 @@ func (c *Controller) RenderBytes() ([]byte, error) {
if c.LayoutSections != nil {
for sectionName, sectionTpl := range c.LayoutSections {
if (sectionTpl == "") {
if sectionTpl == "" {
c.Data[sectionName] = ""
continue
}
@ -391,6 +391,7 @@ func (c *Controller) DelSession(name interface{}) {
// SessionRegenerateID regenerates session id for this session.
// the session data have no changes.
func (c *Controller) SessionRegenerateID() {
c.CruSession.SessionRelease(c.Ctx.ResponseWriter)
c.CruSession = GlobalSessions.SessionRegenerateId(c.Ctx.ResponseWriter, c.Ctx.Request)
c.Ctx.Input.CruSession = c.CruSession
}