I'm working off Webware in CVS. Something has changed in the way Application works with session IDs.
If the browser has been sitting around for a long time and WebKit is restarted, Application tries to retrieve a stale session object and fails due to a KeyError:
Traceback (most recent call last):
File "/opt/Webware/WebKit/Application.py", line 429, in
dispatchRawRequest
self.runTransaction(trans)
File "/opt/Webware/WebKit/Application.py", line 476, in runTransaction
self.runServlet(servlet, trans)
File "/opt/Webware/WebKit/Application.py", line 501, in runServlet
servlet.runTransaction(trans)
File "./WebKit/Servlet.py", line 43, in runTransaction
File "/home/elian/mefa/SiteLib/Page.py", line 169, in sleep
self.showDebugInfo()
File "/home/elian/mefa/SiteLib/Page.py", line 628, in showDebugInfo
print "DDD", self._transaction.session()
File "./WebKit/Transaction.py", line 67, in session
File "/opt/Webware/WebKit/Application.py", line 307, in
createSessionForTransaction
session = self.session(sessId)
File "/opt/Webware/WebKit/Application.py", line 275, in session
return self._sessions[sessionId]
File "./WebKit/SessionDynamicStore.py", line 74, in __getitem__
File "./WebKit/SessionMemoryStore.py", line 33, in __getitem__
KeyError: 20030602003014-fbebd581e95e13ee6e46ca494f376a46
What is happening is that the new version of createSessionForTransaction assumes that sessId is a valid, fresh session ID, so that it doesn't catch the KeyError. The lines in question are marked with *
sessId = transaction.request().sessionId() if debug: print prefix, 'sessId =', sessId * if sessId: * session = self.session(sessId) * if debug: print prefix, 'retrieved session =', session * else: * session = Session(transaction) * self._sessions[session.identifier()] = session * if debug: print prefix, 'created session =', session
I'm thinking that that following patch will fix this:
diff -r1.171 Application.py 306c306 < if sessId: --- > try: 309c309 < else: --- > except KeyError:
Shall I submit this to via SourceForge?
...Edmund.
------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel
