':type jar: CookieJar'

@cookies.setter
def cookies(self, jar):

    stored_attrs = ['value', 'path', 'secure', 'expires']
    self['cookies'] = {}
    for cookie in jar:
        self['cookies'][cookie.name] = dict(((attname, getattr(cookie, attname)) for attname in stored_attrs))
