Message83979
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. |
|
Date |
User |
Action |
Args |
2009-03-22 17:50:31 | hollec | set | recipients:
+ hollec |
2009-03-22 17:50:31 | hollec | set | messageid: <1237744231.54.0.279066174651.issue5537@psf.upfronthosting.co.za> |
2009-03-22 17:50:24 | hollec | link | issue5537 messages |
2009-03-22 17:50:23 | hollec | create | |
|