From 5b407824a5490d108782191876454aef7d59ffe6 Mon Sep 17 00:00:00 2001 From: hoteas Date: Mon, 14 Nov 2022 10:38:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application.go b/application.go index 9657ddf..3da2941 100644 --- a/application.go +++ b/application.go @@ -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