Message168915
| Author |
caligatio |
| Recipients |
caligatio |
| Date |
2012年08月23日.01:35:07 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1345685709.12.0.30740709281.issue15769@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年08月23日 01:35:09 | caligatio | set | recipients:
+ caligatio |
| 2012年08月23日 01:35:09 | caligatio | set | messageid: <1345685709.12.0.30740709281.issue15769@psf.upfronthosting.co.za> |
| 2012年08月23日 01:35:08 | caligatio | link | issue15769 messages |
| 2012年08月23日 01:35:07 | caligatio | create |
|