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 = urllib.request.urlopen(request, cafile = 'cacert.pem')

One would expect to establish a verified HTTPS connection to the host and the 
cookies stored in the cookie jar.  Unfortunately urllib.request.urlopen, when 
called with cafile or capath set, calls urllib.request.build_opener without 
HTTPCookieProcessor included in the chain.  This results in never being able to 
support cookies in a "verified" HTTPS connection.

----------
components: Library (Lib)
messages: 168915
nosy: caligatio
priority: normal
severity: normal
status: open
title: urllib.request.urlopen with cafile or capath set overrides any previous 
Handlers
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15769>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to