{"action":"created","issue":{"url":"https://api.github.com/repos/bbangert/beaker/issues/72","labels_url":"https://api.github.com/repos/bbangert/beaker/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/bbangert/beaker/issues/72/comments","events_url":"https://api.github.com/repos/bbangert/beaker/issues/72/events","html_url":"https://github.com/bbangert/beaker/issues/72","id":53282927,"number":72,"title":"session information not carried across requests","user":{"login":"expntly","id":6870452,"avatar_url":"https://avatars.githubusercontent.com/u/6870452?v=3","gravatar_id":"","url":"https://api.github.com/users/expntly","html_url":"https://github.com/expntly","followers_url":"https://api.github.com/users/expntly/followers","following_url":"https://api.github.com/users/expntly/following{/other_user}","gists_url":"https://api.github.com/users/expntly/gists{/gist_id}","starred_url":"https://api.github.com/users/expntly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expntly/subscriptions","organizations_url":"https://api.github.com/users/expntly/orgs","repos_url":"https://api.github.com/users/expntly/repos","events_url":"https://api.github.com/users/expntly/events{/privacy}","received_events_url":"https://api.github.com/users/expntly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-02T22:34:35Z","updated_at":"2015-05-06T05:50:45Z","closed_at":null,"body":"The setup is a traditional web client (angularjs) making requests to a web server (python 2.6.9, gunicorn 19.0.0, beaker 1.6.4).\r\n\r\napp handling code looks pretty much like so:\r\n\r\n```python\r\nfrom beaker.middleware import SessionMiddleware\r\nsession_opts = {\r\n  \"session.type\": \"cookie\",\r\n  \"session.validate_key\": \"some secret\",\r\n  \"session.cookie_expires\": 3600*24*90,\r\n  \"session.auto\": True,\r\n}\r\napp_handler = ...\r\napplication = SessionMiddleware(app_handler, session_opts)\r\n```\r\n\r\nThe web client makes one HTTP GET and two HTTP POST requests **sequentially** against the web server.  The problem is that the last request doesn't seem to carry the session info that the first request added to the session.  Here's what I see in the server logs:\r\n\r\n* GET / : sets some session info via session[\"info\"] = \"...\"\r\n* POST /foo:\r\n  * beaker.session.id cookie is set (just a long b64 hash)\r\n  * session[\"info\"] has my information, as expected\r\n* POST /bar:\r\n  * beaker.session.id cookie is set and seems to have a different value than the hash just before\r\n  * session does not have \"info\" key, the only thing it's got is an \"_id\" entry.\r\n\r\nSo somehow the session info is cleared after the \"POST /foo\", which makes no sense to me.  Am I missing something?  Also, is beaker.session.id supposed to change all the time?  I seem to always see a different value.\r\n\r\nThanks!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bbangert/beaker/issues/comments/99331450","html_url":"https://github.com/bbangert/beaker/issues/72#issuecomment-99331450","issue_url":"https://api.github.com/repos/bbangert/beaker/issues/72","id":99331450,"user":{"login":"vmbb","id":8977165,"avatar_url":"https://avatars.githubusercontent.com/u/8977165?v=3","gravatar_id":"","url":"https://api.github.com/users/vmbb","html_url":"https://github.com/vmbb","followers_url":"https://api.github.com/users/vmbb/followers","following_url":"https://api.github.com/users/vmbb/following{/other_user}","gists_url":"https://api.github.com/users/vmbb/gists{/gist_id}","starred_url":"https://api.github.com/users/vmbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmbb/subscriptions","organizations_url":"https://api.github.com/users/vmbb/orgs","repos_url":"https://api.github.com/users/vmbb/repos","events_url":"https://api.github.com/users/vmbb/events{/privacy}","received_events_url":"https://api.github.com/users/vmbb/received_events","type":"User","site_admin":false},"created_at":"2015-05-06T05:50:45Z","updated_at":"2015-05-06T05:50:45Z","body":"I'm seeing the same behavior but only on Ubuntu 15.04 - on my Mac it works as advertised - the session id doesn't change and data put in the session stays there. On ubuntu, the session is new on every request. I've tried with memory, file, and cookies seeing if it made any difference, but it does not."}}