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 hollec
Recipients hollec
Date 2009-03-22.17:50:22
SpamBayes Score 1.548241e-10
Marked as misclassified No
Message-id <1237744231.54.0.279066174651.issue5537@psf.upfronthosting.co.za>
In-reply-to
Content
The LWPCookieJar can be saved on 64-bit Ubuntu, but not on 32-bit Ubuntu
when the expiration year is greater than 2038.  This has not been tested
on any other Intel-compatible Linux platform, though it appears related
to the Year 2038 bug.  The MozillaCookieJar does not have a problem
saving on either architecture.

A sample crash is shown below:

  File "/home/user/xblstatus/LiveConnect.py", line 189, in connect
    self.cookiejar.save(self.cookieFile)
  File "/usr/lib/python2.5/_LWPCookieJar.py", line 89, in save
    f.write(self.as_lwp_str(ignore_discard, ignore_expires))
  File "/usr/lib/python2.5/_LWPCookieJar.py", line 75, in as_lwp_str
    r.append("Set-Cookie3: %s" % lwp_cookie_str(cookie))
  File "/usr/lib/python2.5/_LWPCookieJar.py", line 35, in lwp_cookie_str
    time2isoz(float(cookie.expires))))
  File "/usr/lib/python2.5/cookielib.py", line 98, in time2isoz
    year, mon, mday, hour, min, sec = time.gmtime(t)[:6]
ValueError: timestamp out of range for platform time_t

---

The cookie jar and urllib2 integration was done with:

self.cookiejar = cookielib.LWPCookieJar()

self.opener =
urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookiejar))

urllib2.install_opener(self.opener)

---

The code used to save the cookie after accessing the web page was:

self.cookiejar.save(self.cookieFile)

The cookieFile variable is simply the default location of the cookie
file for saving in the program.
History
Date User Action Args
2009-03-22 17:50:31hollecsetrecipients: + hollec
2009-03-22 17:50:31hollecsetmessageid: <1237744231.54.0.279066174651.issue5537@psf.upfronthosting.co.za>
2009-03-22 17:50:24holleclinkissue5537 messages
2009-03-22 17:50:23holleccreate