1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 07:40:54 +00:00

remove comment

This commit is contained in:
iexploree 2016-03-01 13:39:36 +08:00
parent 477de9a3f3
commit a144f117a3
2 changed files with 1 additions and 3 deletions

View File

@ -102,7 +102,6 @@ func (pder *MemProvider) SessionRead(sid string) (Store, error) {
pder.lock.RUnlock() pder.lock.RUnlock()
pder.lock.Lock() pder.lock.Lock()
newsess := &MemSessionStore{sid: sid, timeAccessed: time.Now(), value: make(map[interface{}]interface{})} newsess := &MemSessionStore{sid: sid, timeAccessed: time.Now(), value: make(map[interface{}]interface{})}
// fix bug: new session should be pushed into the head of list(more fresh)
element := pder.list.PushFront(newsess) element := pder.list.PushFront(newsess)
pder.sessions[sid] = element pder.sessions[sid] = element
pder.lock.Unlock() pder.lock.Unlock()
@ -135,7 +134,6 @@ func (pder *MemProvider) SessionRegenerate(oldsid, sid string) (Store, error) {
pder.lock.RUnlock() pder.lock.RUnlock()
pder.lock.Lock() pder.lock.Lock()
newsess := &MemSessionStore{sid: sid, timeAccessed: time.Now(), value: make(map[interface{}]interface{})} newsess := &MemSessionStore{sid: sid, timeAccessed: time.Now(), value: make(map[interface{}]interface{})}
// fix bug: new session should be pushed into the head of list(more fresh)
element := pder.list.PushFront(newsess) element := pder.list.PushFront(newsess)
pder.sessions[sid] = element pder.sessions[sid] = element
pder.lock.Unlock() pder.lock.Unlock()

View File

@ -201,7 +201,7 @@ func (manager *Manager) SessionDestroy(w http.ResponseWriter, r *http.Request) {
if err != nil || cookie.Value == "" { if err != nil || cookie.Value == "" {
return return
} }
// fix bug: cookie.Value has been urlencoded, so should be decoded here
sid, _ := url.QueryUnescape(cookie.Value) sid, _ := url.QueryUnescape(cookie.Value)
manager.provider.SessionDestroy(sid) manager.provider.SessionDestroy(sid)
if manager.config.EnableSetCookie { if manager.config.EnableSetCookie {