losing large session data with python27

22 views
Skip to first unread message

Monte Bel

unread,
Mar 2, 2012, 4:36:48 PM3/2/12
to gae-se...@googlegroups.com
I began having this issue after switching to the 2.7 runtime with session data that exceeds MAX_DATA_PER_COOKIE.  gaesessions appears to adds chunks of the session data to the header via:

for ch in _tls.current_session.make_cookie_headers():
    headers.append(('Set-Cookie', ch))

However, only the first chunk ends up in the response, corrupting the session data.  I suspect this is buried somewhere in webapp2 but am not able to figure out how the list "headers" is converted into the actual response.header.  Occurs on both the dev_appserver and in production.

TIA for any thoughts or advice.

David Underhill

unread,
Mar 2, 2012, 4:44:08 PM3/2/12
to gae-se...@googlegroups.com
Hmm, that's unfortunate.  Your intuition about this being an incompatibility with webapp2 seems reasonable; probably a good place to start digging as we try to figure out what's going wrong when your data spills into multiple cookies.  If you run this in pdb and step through what is happening, are you able to see why the second cookie isn't being transmitted?

~ David

Monte Bel

unread,
Mar 6, 2012, 2:16:05 PM3/6/12
to gae-sessions
After some pdbing gaesessions cookie splitting actually seems fine.
The "dev_appserver_login" cookie
(dev_appserver_login.SetUserInfoCookie()) is lost when gaesessions
goes from one cookie to two. I am struggling to figure out why.
Reply all
Reply to author
Forward
0 new messages