I've been observing session IDs over sequential requests and observed some things I cannot explain:
1) When calling req.sessionID
vs. req.cookies["connect.sid"]
the values are different (it appears the request.sessionID
is magically returning the SID from its associated response - which seems impossible to me).
From my understanding of the Connect source code, req.sessionID
is synonymous with the cookie key, why the difference?
2) The first time I make a request from the node server, the browser is issued an SID (let's call this SID1). The next time I connect, the browser is issued SID2. The third and subsequent times I am again issued SID2. Why does node+Connect issue two session IDs before settling down?