New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
urllib2 ignores opener configuration under certain circumstances #67355
Comments
Python 2.7.9 has a bug in urllib2.py:urlopen(). |
Thanks for the report. Could you provide an example to reproduce the issue you described? |
Attached a script demonstrating two failing cases |
I guess there needs to be some generic way to pass ssl information to handlers. |
I got the same error suddenly with Python 2.7.9. I think this is quite unfortunate because it somewhat breaks existing behaviour, especially that SSL certificate verification is enabled by default. Anyway, attached is my use case where I use a HTTPS request coupled with HTTP basic authentication and disabled SSL cert verification. In the attached script there is also a workaround which works for me by not using urlopen() but instead calling opener.open() manually after adding the necessary handlers myself. |
I've made a patch for 3.4 that addresses this issue. See bpo-18543, latest patch, and test file |
I think these are essentially the same problem. It defeats any custom installed opener, not just custom HTTPS handlers. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: