Re: Greetings
Andrew McNamara <[email protected]> Thu, 03 Feb 2005 14:15:53 +1100
| Newsgroups | gmane.comp.web.albatross.general |
|---|---|
| Message-ID | <[email protected]> |
>What a great design! Thanks! >And now for my first question... Any way to support cookies? (I mean, >actual site cookies for long-term persistence, beyond storing session IDs.) >My best guess at the moment is to take what I need from the (CGI, >mod_python, etc.) Request object and tweak it before wrapping it in the >albatross Request, because I don't seem to be able to find it after that. >Maybe I'm missing something dumb and obvious. Have a look at how Albatross does it's cookie handling - the SessionCookieMixin class in albatross/session.py. SessionCookieMixin._set_sesid_cookie() uses set_header - when adding another cookie, you should use add_header (append) rather than set_header (which will overwrite the cookie set by _set_sesid_cookie(). Hope this gives you some ideas. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/