fix #252
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -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 | } | ... | ... |
-
Please register or sign in to post a comment