修复部分bug

This commit is contained in:
hoteas 2022-11-14 10:38:15 +08:00
parent 56f66fcaed
commit 5b407824a5
1 changed files with 3 additions and 0 deletions

View File

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