Changeset 619
- Timestamp:
- 09/09/05 08:15:15
- Files:
-
- trunk/cherrypy/_cphttptools.py (modified) (1 diff)
- trunk/cherrypy/test/test_core.py (modified) (1 diff)
- trunk/docs/book/xml/sessions.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttptools.py
r616 r619 494 494 # Remove "root" from object_path and join it to get objectPath 495 495 cherrypy.request.objectPath = '/' + '/'.join(object_path[1:]) 496 try: 497 args = virtual_path + cherrypy.request.paramList 498 body = page_handler(*args, **cherrypy.request.paramMap) 499 except TypeError, x: 500 m = re.match(r"(.*)\(\) got an unexpected keyword argument '(.*)'", x.args[0]) 501 if m: 502 fname, pname = m.groups() 503 msg = ("The '%s' page handler received a '%s' parameter, " 504 "which it does not handle." % (fname, pname)) 505 raise TypeError(msg, repr(page_handler)) 506 raise 496 args = virtual_path + cherrypy.request.paramList 497 body = page_handler(*args, **cherrypy.request.paramMap) 507 498 cherrypy.response.body = iterable(body) 508 499 return trunk/cherrypy/test/test_core.py
r617 r619 315 315 try: 316 316 self.getPage("/params/?notathing=meeting") 317 self.assertInBody("The 'index' page handler received a 'notathing' " 318 "parameter, which it does not handle.") 317 self.assertInBody("TypeError: index() got an unexpected keyword argument 'notathing'") 319 318 finally: 320 319 ignore.pop() trunk/docs/book/xml/sessions.xml
r611 r619 126 126 <section id="concurrent"> 127 127 <title>Handling concurrent requests for the same session data</title> 128 <para>It is normally quite rare to have t o simultaneous requests with the same session ID. It means that a same browser is making 2 requests to your server at the same time (to dynamic pages ... static pages don't have sessions). However, this case can happen (if you're using frames for instance), and it will happen more and more often as more and more people start using Ajax.</para>128 <para>It is normally quite rare to have two simultaneous requests with the same session ID. It means that a same browser is making 2 requests to your server at the same time (to dynamic pages ... static data like images don't have sessions). However, this case can happen (if you're using frames for instance), and it will happen more and more often as more and more people start using Ajax.</para> 129 129 <para>In that case, we need to make sure that access to the session data is serialized. This way threads can't both modify the data at the same time and leave it in an inconsistent state.</para> 130 130 <para>By default, CherryPy will serialize access to the session data, so if a browser makes a second request while a first request is still being handled by the server, the second request will block while the first request is accessing the data. As soon as the first request is finished then the second request will be able to access it.</para>

