New submission from Mike Cencula <m...@cencula.com>: I'm trying to use cookielib.LWPCookieJar.save() to save cookies from a website. The cookie file is created with a header line, but the cookies are not stored. Example program attached.
Python version: 2.5.2 (r252:60911, Jan 24 2010, 14:53:14) Running on Debian lenny as a guest on Virtualbox Output from the attached file pasted below: ------------ mike@debian:~$ python cookieexample2.py Here are the headers of the page : Server: none Content-Type: text/html Pragma: no-cache Cache-Control: no-cache Expires: Tue, 04 Dec 1993 21:29:02 GMT Vary: Accept-Encoding Date: Wed, 23 Feb 2011 20:43:55 GMT Transfer-Encoding: chunked Connection: close Connection: Transfer-Encoding These are the cookies we have received so far : 0 : <Cookie BIGipServerdiy_pool=604317450.20480.0000 for www.diy.co.uk/> 1 : <Cookie BIGipServerdiy_pool=637871882.20480.0000 for www.diy.com/> 2 : <Cookie DYN_USER_CONFIRM=1ab776eae0bf5661a2955c6ec7858439 for www.diy.com/> 3 : <Cookie DYN_USER_ID=1619150879 for www.diy.com/> 4 : <Cookie JSESSIONID=OVHJMMEHW4LOQCRHAWVCFFIKE2C0YIV0 for www.diy.com/> mike@debian:~$ Contents of cookie.lwp afterward: ------------ mike@debian:~$ cat cookies.lwp #LWP-Cookies-2.0 mike@debian:~$ Behavior is nearly identical using cookielib.MozillaCookieJar except the headers are different in the saved cookie file. Cookies themselves are not saved. I am new to Python, so I hope this is not user error. ---------- components: Library (Lib) files: cookieexample2.py messages: 129223 nosy: mcencula priority: normal severity: normal status: open title: cookielib.LWPCookieJar.save() doesn't save cookies type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file20868/cookieexample2.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11301> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com