Issue 8975: Bug in cookiejar (original) (raw)

Created on 2010-06-11 17:34 by Claudiu.Popa, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg107564 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2010-06-11 17:34
Hello. This is my first report, sorry if I won't do it right. I found a bug in cookielib, which looks like this(a traceback): """C:\Python31\lib\http\cookiejar.py:1586: UserWarning: http.cookiejar bug! Traceback (most recent call last): File "C:\Python31\lib\http\cookiejar.py", line 1584, in make_cookies parse_ns_headers(ns_hdrs), request) File "C:\Python31\lib\http\cookiejar.py", line 1541, in _cookies_from_attrs_se t cookie = self._cookie_from_cookie_tuple(tup, request) File "C:\Python31\lib\http\cookiejar.py", line 1460, in _cookie_from_cookie_tu ple version = int(version) ValueError: invalid literal for int() with base 10: '1.0' _warn_unhandled_exception()"""
msg107565 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-06-11 17:37
Thanks for your report. Can you copy the code provoking the bug?
msg107566 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2010-06-11 17:45
""" CHttp.__init__(self,1,proxy = shared.setts.currentGoogleProxy) self.timeout = shared.setts.cGglHttpTimeout self.proxy = globShare.currentGoogleProxy[globShare.currentGoogleIndex] if self.proxy: proxy_support = urllib.request.ProxyHandler({'http':self.proxy,'https':self.proxy,'ftp':self.proxy}) else: proxy_support = urllib.request.ProxyHandler({}) #socket.setdefaulttimeout(30) #self._cp = urllib.request.HTTPCookieProcessor(http.cookiejar.CookieJar()) self._cj = http.cookiejar.MozillaCookieJar() self._opener1 = urllib.request.build_opener(proxy_support,self._cp) ..... openedUrl = self._opener1.open(req)""" The script was a crawler that searches for pdf's on internet. One thread printed the untreated exception.
msg107568 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-06-11 17:51
Could you provide a minimal usable script? We can’t run your excerpt to reproduce the bug, and reproducing is the first step to debugging. I think we’ll also need the site address, or the cookie header, or the cookies file that provoke the bug.
msg110118 - (view) Author: John J Lee (jjlee) Date: 2010-07-12 18:11
This is a duplicate of
History
Date User Action Args
2022-04-11 14:57:02 admin set github: 53221
2010-07-12 20:31:34 eric.araujo set status: open -> closedtype: crash -> behaviorsuperseder: cookielib chokes on non-integer cookie version, should ignore it insteadresolution: duplicatestage: resolved
2010-07-12 18:11:49 jjlee set nosy: + jjleemessages: +
2010-06-11 17:51:46 eric.araujo set messages: +
2010-06-11 17:45:37 Claudiu.Popa set messages: +
2010-06-11 17:37:56 eric.araujo set nosy: + eric.araujomessages: +
2010-06-11 17:34:48 Claudiu.Popa create