Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1302

Show
Ignore:
Timestamp:
08/30/06 16:54:42
Author:
fumanchu
Message:

Changed "simple_cookie" to just "cookie".

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cprequest.py

    r1296 r1302  
    284284    header_list = [] 
    285285    headers = http.HeaderMap() 
    286     simple_cookie = Cookie.SimpleCookie() 
     286    cookie = Cookie.SimpleCookie() 
    287287    rfile = None 
    288288    process_request_body = True 
     
    403403            self.rfile = rfile 
    404404            self.headers = http.HeaderMap() 
    405             self.simple_cookie = Cookie.SimpleCookie() 
     405            self.cookie = Cookie.SimpleCookie() 
    406406            self.handler = None 
    407407             
     
    498498            # Warning: if there is more than one header entry for cookies (AFAIK, 
    499499            # only Konqueror does that), only the last one will remain in headers 
    500             # (but they will be correctly stored in request.simple_cookie). 
     500            # (but they will be correctly stored in request.cookie). 
    501501            if "=?" in value: 
    502502                dict.__setitem__(headers, name, http.decode_TEXT(value)) 
     
    507507            # cookies come on different lines with the same key 
    508508            if name == 'Cookie': 
    509                 self.simple_cookie.load(value) 
     509                self.cookie.load(value) 
    510510         
    511511        if not dict.__contains__(headers, 'Host'): 
     
    704704    header_list = [] 
    705705    headers = http.HeaderMap() 
    706     simple_cookie = Cookie.SimpleCookie() 
     706    cookie = Cookie.SimpleCookie() 
    707707    body = Body() 
    708708    time = None 
     
    725725            "Date": http.HTTPDate(self.time), 
    726726        }) 
    727         self.simple_cookie = Cookie.SimpleCookie() 
     727        self.cookie = Cookie.SimpleCookie() 
    728728     
    729729    def collapse_body(self): 
     
    758758        self.header_list = h = headers.output(cherrypy.request.protocol) 
    759759         
    760         cookie = self.simple_cookie.output() 
     760        cookie = self.cookie.output() 
    761761        if cookie: 
    762762            for line in cookie.split("\n"): 
  • trunk/cherrypy/lib/sessions.py

    r1287 r1302  
    383383    # Check if request came with a session ID 
    384384    id = None 
    385     if name in request.simple_cookie: 
    386         id = request.simple_cookie[name].value 
     385    if name in request.cookie: 
     386        id = request.cookie[name].value 
    387387     
    388388    if not hasattr(cherrypy, "session"): 
     
    401401     
    402402    # Set response cookie 
    403     cookie = cherrypy.response.simple_cookie 
     403    cookie = cherrypy.response.cookie 
    404404    cookie[name] = sess.id 
    405405    cookie[name]['path'] = path or request.headers.get(path_header) or '/' 
     
    423423    exp = time.gmtime(time.time() - one_year) 
    424424    t = time.strftime("%a, %d-%b-%Y %H:%M:%S GMT", exp) 
    425     cherrypy.response.simple_cookie[name]['expires'] = t 
    426  
     425    cherrypy.response.cookie[name]['expires'] = t 
     426 
  • trunk/cherrypy/test/test_core.py

    r1294 r1302  
    347347         
    348348        def single(self, name): 
    349             cookie = cherrypy.request.simple_cookie[name] 
    350             cherrypy.response.simple_cookie[name] = cookie.value 
     349            cookie = cherrypy.request.cookie[name] 
     350            cherrypy.response.cookie[name] = cookie.value 
    351351         
    352352        def multiple(self, names): 
    353353            for name in names: 
    354                 cookie = cherrypy.request.simple_cookie[name] 
    355                 cherrypy.response.simple_cookie[name] = cookie.value 
     354                cookie = cherrypy.request.cookie[name] 
     355                cherrypy.response.cookie[name] = cookie.value 
    356356 
    357357 

Hosted by WebFaction

Log in as guest/cpguest to create tickets