修复部分bug

This commit is contained in:
hoteas 2022-11-14 10:38:15 +08:00
parent 56f66fcaed
commit 5b407824a5

View File

@ -329,6 +329,9 @@ func (that *Application) handler(w http.ResponseWriter, req *http.Request) {
if len(token) == 32 { if len(token) == 32 {
sessionId = token sessionId = token
//没有token则查阅session //没有token则查阅session
if cookie == nil || cookie.Value != sessionId {
needSetCookie = sessionId
}
} else if err == nil && cookie.Value != "" { } else if err == nil && cookie.Value != "" {
sessionId = cookie.Value sessionId = cookie.Value
//session也没有则判断是否创建cookie //session也没有则判断是否创建cookie