You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug Session.IsNew() always returns false if I use a db.
Iris version: v12.1.8
To Reproduce
A new HTTP request comes in with an empty cookie, the Start function is called by the middleware session.Handler(), then I found that s.provider.db.Len(sid) was 0 after a new sid was created, but after the line 87 invoked: sess := s.provider.Init(sid, s.config.Expires), s.provider.db.Len(sid) returns 1. so, session.IsNew() will always return false, even though it is a clean、new HTTP request.
Shall we swap the line 87 and 88 ?
Expected behavior
A new HTTP request comes in and session.IsNew() returns true correctly.
Screenshots
Desktop
OS: Ubuntu 18.04.4.LTS
Additional context
I use a redis to store my session info
The text was updated successfully, but these errors were encountered:
Describe the bug
Session.IsNew()
always returnsfalse
if I use a db.To Reproduce
A new HTTP request comes in with an empty cookie, the
Start
function is called by the middlewaresession.Handler()
, then I found thats.provider.db.Len(sid)
was 0 after a new sid was created, but after the line 87 invoked:sess := s.provider.Init(sid, s.config.Expires)
,s.provider.db.Len(sid)
returns 1. so,session.IsNew()
will always return false, even though it is a clean、new HTTP request.Shall we swap the line 87 and 88 ?
Expected behavior
A new HTTP request comes in and
session.IsNew()
returns true correctly.Screenshots
Desktop
Additional context
I use a redis to store my session info
The text was updated successfully, but these errors were encountered: