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 B. Kyven
Recipients B. Kyven
Date 2013-02-20.06:48:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361342913.69.0.115494364841.issue17251@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

I am using LWPCookieJar to store cookies. But I am having trouble.
Saving is fine, load is wrong. I use Cookie.domain_specified to judge if domain exist.

save the following to test.lwp
-----------------
#LWP-Cookies-2.0
Set-Cookie3: name=value; path="/ddd/"; domain=".domain.com"; path_spec; domain_dot; secure; expires="2030-05-09 14:25:11Z"; version=0
Set-Cookie3: name=value; path="/ddd/"; domain="www.domain.com"; path_spec; secure; expires="2030-05-09 14:25:11Z"; version=0
-----------------

>cj = LWPCookieJar('test.lwp').load()
>for c in cj:
>    print c.domain, c.domain_specified, c.domain_initial_dot

output:
.domain.com       True      True
www.domain.com  **False**   True

If understood correctly, domain_specified should equal bool(c.domain ="").

This is seen on 2.7 and 2.6.
History
Date User Action Args
2013-02-20 06:48:33B. Kyvensetrecipients: + B. Kyven
2013-02-20 06:48:33B. Kyvensetmessageid: <1361342913.69.0.115494364841.issue17251@psf.upfronthosting.co.za>
2013-02-20 06:48:33B. Kyvenlinkissue17251 messages
2013-02-20 06:48:33B. Kyvencreate