742c432f by astaxie

fix #252

1 parent 3ac5eec3
...@@ -51,7 +51,7 @@ type Manager struct { ...@@ -51,7 +51,7 @@ type Manager struct {
51 maxlifetime int64 51 maxlifetime int64
52 hashfunc string //support md5 & sha1 52 hashfunc string //support md5 & sha1
53 hashkey string 53 hashkey string
54 maxage int 54 maxage int //cookielifetime
55 secure bool 55 secure bool
56 options []interface{} 56 options []interface{}
57 } 57 }
...@@ -137,8 +137,8 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se ...@@ -137,8 +137,8 @@ func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (se
137 cookie.Path = "/" 137 cookie.Path = "/"
138 if manager.maxage >= 0 { 138 if manager.maxage >= 0 {
139 cookie.MaxAge = manager.maxage 139 cookie.MaxAge = manager.maxage
140 http.SetCookie(w, cookie)
140 } 141 }
141 http.SetCookie(w, cookie)
142 sid, _ := url.QueryUnescape(cookie.Value) 142 sid, _ := url.QueryUnescape(cookie.Value)
143 session, _ = manager.provider.SessionRead(sid) 143 session, _ = manager.provider.SessionRead(sid)
144 } 144 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!