John J Lee <[EMAIL PROTECTED]> added the comment: You haven't said what the specific problem is. Note that the SimpleCookie class really represents a set of cookies, and the Morsel class represents a single cookie. It seems that setting special value-less cookie-attributes like "secure" works:
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Cookie >>> c = Cookie.SimpleCookie("spam=eggs; foo=bar") >>> c.output() 'Set-Cookie: foo=bar\r\nSet-Cookie: spam=eggs' >>> c["foo"]["secure"] = 1 >>> c.output() 'Set-Cookie: foo=bar; secure\r\nSet-Cookie: spam=eggs' HttpOnly support was added here: http://bugs.python.org/issue1638033 However, I don't know why BaseCookie.load() treats "secure" or "HttpOnly" specially at all -- those names are not special in Cookie: heders. _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1028088> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com