There isn't much context with this because it really is a situation where something should work, but it just doesn't.
I am using the martini framework. In one handler I'm using this:
session.Set("deployed", "true")
r.Redirect("/myOtherURL", http.StatusSeeOther)
Whereby 'session' is the sessions.Session object passed through to the handler. In the handler that loads myOtherURL, I'm using session.Get but nothing is being returned. I printed out all of the session content and the 'deployed' is not present.
What could be causing this problem? What could I possibly be missing out? I would give more context if I could but it really is as simple as this.
Just to extend on my comment/help others in the future:
Pathvalue, the cookie takes on the current path.Cookies are only sent for that path and paths below - not above - e.g.
/moduleswhen you implicitly set it for the first time viasession.Set(val, key)/modules,/modules/alland/modules/detail/12/aboutor/This can be fixed by explicitly setting the path:
Be aware that you may not want to send a cookie for all routes (which is what
/will do) - so use judgement.