This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jjlee
Recipients akuchling, andresriancho, facundobatista, jjlee, sirilyan
Date 2008-10-09.23:29:10
SpamBayes Score 2.4819036e-13
Marked as misclassified No
Message-id <1223594953.05.0.146383194578.issue1028088@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-10-09 23:29:13jjleesetrecipients: + jjlee, akuchling, facundobatista, sirilyan, andresriancho
2008-10-09 23:29:13jjleesetmessageid: <1223594953.05.0.146383194578.issue1028088@psf.upfronthosting.co.za>
2008-10-09 23:29:12jjleelinkissue1028088 messages
2008-10-09 23:29:11jjleecreate