Brian Turek added the comment:
So I'm not saying the attached patch is the *best* solution but it doesn't
mangle the existing urllib.request._opener too much.
--
keywords: +patch
Added file: http://bugs.python.org/file26977/request.patch
Brian Turek added the comment:
I was actually going to come up with a patch that does the same thing orsenthil
mentioned until I too was stymied by the use of bisect.insort
Does anyone know why bisect.insort was used instead of just list.append? I
don't see an obvious reason so I think
New submission from Brian Turek:
Using the code snippet below:
cj = http.cookiejar.CookieJar()
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor())
urllib.request.install_opener(opener)
request = urllib.request.Request(url, data, headers) # url is https://something
sock