Issue Details (XML | Word | Printable)

Key: MODPYTHON-59
Type: New Feature New Feature
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Jim Gallacher
Reporter: Jim Gallacher
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
mod_python

Add get_session() method to request object

Created: 14/Jun/05 11:49 AM   Updated: 20/Oct/06 02:47 PM
Return to search
Component/s: session
Affects Version/s: 3.1.3, 3.1.4, 3.2.7
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works Session.py.diff.txt 2005-08-09 09:22 PM Graham Dumpleton 2 kB
Environment: All

Resolution Date: 20/Oct/06 02:47 PM


 Description  « Hide
Users will get session instances by calling req.get_session(). If a session already exists it will be returned, otherwise a new session instance will be created. Session configuration will be handled using apache directives rather than within their code.

Using this scheme means only one session instance will be created per request, which will eliminate the deadlock problems many people experience. Also, using this scheme makes it possible for sessions to be properly handled within psp pages and across req.internal_redirect() calls.

Code will be commited to svn shortly.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #190550 Tue Jun 14 02:54:36 UTC 2005 jgallacher Added request.get_session() support as described in MODPYTHON-59
Files Changed
MODIFY /httpd/mod_python/trunk/src/include/requestobject.h
MODIFY /httpd/mod_python/trunk/src/requestobject.c
MODIFY /httpd/mod_python/trunk/lib/python/mod_python/Session.py

Repository Revision Date User Message
ASF #191613 Tue Jun 21 01:23:13 UTC 2005 jgallacher Fixed memory leak by decreasing the reference count of the requestobject.
Ref MODPYTHON-59
Files Changed
MODIFY /httpd/mod_python/trunk/src/requestobject.c

Repository Revision Date User Message
ASF #191711 Tue Jun 21 19:07:15 UTC 2005 jgallacher create_session now gets the type session type to create from the apache
config as defined by PythonOption session name_of_session_class.
Ref MODPYTHON-59
Files Changed
MODIFY /httpd/mod_python/trunk/lib/python/mod_python/Session.py

Repository Revision Date User Message
ASF #225653 Wed Jul 27 23:27:31 UTC 2005 jgallacher Fixed issue where session cookie was not being set after an internal redirect.
Ref MODPYTHON-59
Files Changed
MODIFY /httpd/mod_python/trunk/lib/python/mod_python/Session.py

Repository Revision Date User Message
ASF #226320 Fri Jul 29 01:25:18 UTC 2005 jgallacher req_get_session is not ready for release 3.2 to it's implementation will be deferred to mod_python 3.3.0.
As a temporay measure calling req_get_session in version 3.2.x will raise a NotImplemented error.
The behaviour of PSP.run() in psp.py has reverted such that it no longer makes use of req.get_session().
Ref MODPYTHON-59
Files Changed
MODIFY /httpd/mod_python/trunk/lib/python/mod_python/psp.py
MODIFY /httpd/mod_python/trunk/src/requestobject.c

Repository Revision Date User Message
ASF #466123 Fri Oct 20 14:33:57 UTC 2006 jgallacher (MODPYTHON-59) Excised the code stub for the req.get_session() functionality.
The general idea still has merit, but the proposed solution was wrong.
This issue should be closed. It can always be resurrected in another
form later if desired.
Files Changed
MODIFY /httpd/mod_python/trunk/src/requestobject.c