Changeset 942
- Timestamp:
- 01/26/06 06:10:21
- Files:
-
- trunk/cherrypy/_cphttptools.py (modified) (5 diffs)
- trunk/cherrypy/filters/sessionfilter.py (modified) (2 diffs)
- trunk/cherrypy/test/test_core.py (modified) (1 diff)
- trunk/docs/book/xml/apireference.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttptools.py
r939 r942 58 58 self.headers = httptools.HeaderMap() 59 59 self.headerMap = self.headers # Backward compatibility 60 self.simpleCookie = Cookie.SimpleCookie() 60 self.simple_cookie = Cookie.SimpleCookie() 61 self.simpleCookie = self.simple_cookie # Backward compatibility 61 62 62 63 if cherrypy.profiler: … … 171 172 # Warning: if there is more than one header entry for cookies (AFAIK, 172 173 # only Konqueror does that), only the last one will remain in headers 173 # (but they will be correctly stored in request.simple Cookie).174 # (but they will be correctly stored in request.simple_cookie). 174 175 self.headers[name] = value 175 176 … … 177 178 # cookies come on different lines with the same key 178 179 if name.title() == 'Cookie': 179 self.simple Cookie.load(value)180 self.simple_cookie.load(value) 180 181 181 182 # Save original values (in case they get modified by filters) … … 379 380 "Content-Length": None 380 381 }) 381 self.simpleCookie = Cookie.SimpleCookie() 382 self.simple_cookie = Cookie.SimpleCookie() 383 self.simpleCookie = self.simple_cookie # Backward compatibility 382 384 383 385 def collapse_body(self): … … 428 430 self.header_list = [item[1] for item in header_list] 429 431 430 cookie = self.simple Cookie.output()432 cookie = self.simple_cookie.output() 431 433 if cookie: 432 434 lines = cookie.split("\n") trunk/cherrypy/filters/sessionfilter.py
r940 r942 118 118 119 119 # Check if request came with a session ID 120 if cookie_name in cherrypy.request.simple Cookie:120 if cookie_name in cherrypy.request.simple_cookie: 121 121 # It did: we mark the data as needing to be loaded 122 sess.session_id = cherrypy.request.simple Cookie[cookie_name].value122 sess.session_id = cherrypy.request.simple_cookie[cookie_name].value 123 123 124 124 # If using implicit locking, acquire lock … … 135 135 sess.on_create_session(sess.session_data) 136 136 # Set response cookie 137 cookie = cherrypy.response.simple Cookie137 cookie = cherrypy.response.simple_cookie 138 138 cookie[cookie_name] = sess.session_id 139 139 cookie[cookie_name]['path'] = cookie_path trunk/cherrypy/test/test_core.py
r917 r942 301 301 302 302 def single(self, name): 303 cookie = cherrypy.request.simple Cookie[name]304 cherrypy.response.simple Cookie[name] = cookie.value303 cookie = cherrypy.request.simple_cookie[name] 304 cherrypy.response.simple_cookie[name] = cookie.value 305 305 306 306 def multiple(self, names): 307 307 for name in names: 308 cookie = cherrypy.request.simple Cookie[name]309 cherrypy.response.simple Cookie[name] = cookie.value308 cookie = cherrypy.request.simple_cookie[name] 309 cherrypy.response.simple_cookie[name] = cookie.value 310 310 311 311 class MaxRequestSize(Test): trunk/docs/book/xml/apireference.xml
r880 r942 48 48 </section> 49 49 <section> 50 <title>cherrypy.request.simple Cookie</title>50 <title>cherrypy.request.simple_cookie</title> 51 51 <para>This attribute is a SimpleCookie instance from the standard library's Cookie module 52 52 which contains the incoming cookie values from the client.</para> … … 156 156 </section> 157 157 <section> 158 <title>cherrypy.response.simple Cookie</title>158 <title>cherrypy.response.simple_cookie</title> 159 159 <para>This attribute is a SimpleCookie instance from the standard library's Cookie 160 160 module. It contains the outgoing cookie values.</para>

