From a144f117a3ecefe54ec5fd16f3229c47a988ca2b Mon Sep 17 00:00:00 2001 From: iexploree Date: Tue, 1 Mar 2016 13:39:36 +0800 Subject: [PATCH] remove comment --- session/sess_mem.go | 2 -- session/session.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/session/sess_mem.go b/session/sess_mem.go index 8d75d2c6..64d8b056 100644 --- a/session/sess_mem.go +++ b/session/sess_mem.go @@ -102,7 +102,6 @@ func (pder *MemProvider) SessionRead(sid string) (Store, error) { pder.lock.RUnlock() pder.lock.Lock() 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) pder.sessions[sid] = element pder.lock.Unlock() @@ -135,7 +134,6 @@ func (pder *MemProvider) SessionRegenerate(oldsid, sid string) (Store, error) { pder.lock.RUnlock() pder.lock.Lock() 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) pder.sessions[sid] = element pder.lock.Unlock() diff --git a/session/session.go b/session/session.go index 4c422906..9fe99a17 100644 --- a/session/session.go +++ b/session/session.go @@ -201,7 +201,7 @@ func (manager *Manager) SessionDestroy(w http.ResponseWriter, r *http.Request) { if err != nil || cookie.Value == "" { return } - // fix bug: cookie.Value has been urlencoded, so should be decoded here + sid, _ := url.QueryUnescape(cookie.Value) manager.provider.SessionDestroy(sid) if manager.config.EnableSetCookie {