Message74609
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. |
|
Date |
User |
Action |
Args |
2008-10-09 23:29:13 | jjlee | set | recipients:
+ jjlee, akuchling, facundobatista, sirilyan, andresriancho |
2008-10-09 23:29:13 | jjlee | set | messageid: <1223594953.05.0.146383194578.issue1028088@psf.upfronthosting.co.za> |
2008-10-09 23:29:12 | jjlee | link | issue1028088 messages |
2008-10-09 23:29:11 | jjlee | create | |
|