Use the lowercase http_proxy environment variable

The 'correct' way is to have it lowercase, though there is a lot of
confusion around it.
This commit is contained in:
Laurent Bachelier 2011-04-09 15:40:23 +02:00
commit 39bfdade27

View file

@ -185,6 +185,8 @@ class BaseBackend(object):
if '_proxy' in self._private_config:
kwargs['proxy'] = self._private_config['_proxy']
elif 'http_proxy' in os.environ:
kwargs['proxy'] = os.environ['http_proxy']
elif 'HTTP_PROXY' in os.environ:
kwargs['proxy'] = os.environ['HTTP_PROXY']
kwargs['logger'] = self.logger