Author: chrisz
Date: Sat Oct 13 05:05:09 2007
New Revision: 7032
Modified:
Webware/trunk/WebKit/HTTPResponse.py
Webware/trunk/WebKit/Transaction.py
Log:
HTTPResponse created a Session for every request (bug #1809957 reported by Ben Parker).
Modified: Webware/trunk/WebKit/HTTPResponse.py
==============================================================================
--- Webware/trunk/WebKit/HTTPResponse.py (original)
+++ Webware/trunk/WebKit/HTTPResponse.py Sat Oct 13 05:05:09 2007
@@ -349,7 +349,7 @@
app = trans.application()
if not app.setting('UseCookieSessions'):
return
- sess = trans.session()
+ sess = trans._session
if sess:
cookie = Cookie(app.sessionName(trans), sess.identifier())
cookie.setPath(app.sessionCookiePath(trans))
Modified: Webware/trunk/WebKit/Transaction.py
==============================================================================
--- Webware/trunk/WebKit/Transaction.py (original)
+++ Webware/trunk/WebKit/Transaction.py Sat Oct 13 05:05:09 2007
@@ -61,7 +61,7 @@
self._response = response
def hasSession(self):
- """ Returns true if the transaction has a session. """
+ """Return true if the transaction has a session."""
id = self._request.sessionId()
return id and self._application.hasSession(id)
@@ -70,7 +70,7 @@
A new transaction is created if necessary. Therefore, this method
never returns None. Use hasSession() if you want to find out if
- there one already exists.
+ a session already exists.
"""
if not self._session:
|