Handle https proxies specified with a http:// URL

This commit is contained in:
Kovid Goyal 2011-10-05 09:58:56 -06:00
parent ae4840a88c
commit d1930a1ea0

View File

@ -278,6 +278,8 @@ def get_proxies(debug=True):
continue continue
if proxy.startswith(key+'://'): if proxy.startswith(key+'://'):
proxy = proxy[len(key)+3:] proxy = proxy[len(key)+3:]
if key == 'https' and proxy.startswith('http://'):
proxy = proxy[7:]
if proxy.endswith('/'): if proxy.endswith('/'):
proxy = proxy[:-1] proxy = proxy[:-1]
if len(proxy) > 4: if len(proxy) > 4: