This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author stefano-m
Recipients stefano-m
Date 2015-07-09.18:14:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1436465655.95.0.514799824016.issue24599@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

at work, I am behind a proxy (squid) that is only available over http. So, I have to configure both the http_proxy and https_proxy environment variables to be something like "http://proxy.corp.com:8181"

Now, when I try and use urllib to open an "https" url, the proxy returns "501 Not Implemented".


The quick and dirty script below is a minimal demonstration of the problem that appears on both python 2.7 (tested on 2.7.6, 2.7.9, 2.7.10) and 3.4 (tested on 3.4.0 and 3.4.4)

try:
    import urllib
    opener = urllib.URLopener()
except AttributeError:
    # Python 3
    import urllib.request
    opener = urllib.request.URLopener()

url = 'https://www.python.org'

print("Trying to open", url)

opener.open(url)


Changing the url to "http://" works OK.

Thanks,

-- Stefano
History
Date User Action Args
2015-07-09 18:14:15stefano-msetrecipients: + stefano-m
2015-07-09 18:14:15stefano-msetmessageid: <1436465655.95.0.514799824016.issue24599@psf.upfronthosting.co.za>
2015-07-09 18:14:15stefano-mlinkissue24599 messages
2015-07-09 18:14:15stefano-mcreate