libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [02/10] libcloud git commit: make redirects configurable
Date Fri, 13 Jan 2017 03:30:29 GMT
make redirects configurable


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/11fc4c8d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/11fc4c8d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/11fc4c8d

Branch: refs/heads/trunk
Commit: 11fc4c8d05b300fc4b0b71ff5c48c35f1dbd293b
Parents: e02a8f0
Author: Anthony Shaw <anthonyshaw@apache.org>
Authored: Fri Jan 13 13:12:59 2017 +1100
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Fri Jan 13 13:12:59 2017 +1100

----------------------------------------------------------------------
 libcloud/httplib_ssl.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/11fc4c8d/libcloud/httplib_ssl.py
----------------------------------------------------------------------
diff --git a/libcloud/httplib_ssl.py b/libcloud/httplib_ssl.py
index 913ad6c..0110e69 100644
--- a/libcloud/httplib_ssl.py
+++ b/libcloud/httplib_ssl.py
@@ -32,6 +32,8 @@ __all__ = [
     'LibcloudConnection'
 ]
 
+ALLOW_REDIRECTS = 1
+
 HTTP_PROXY_ENV_VARIABLE_NAME = 'http_proxy'
 
 # Error message which is thrown when establishing SSL / TLS connection fails
@@ -197,7 +199,7 @@ class LibcloudConnection(LibcloudBaseConnection):
             url=url,
             data=body,
             headers=headers,
-            allow_redirects=1,
+            allow_redirects=ALLOW_REDIRECTS,
             stream=stream,
             verify=self.verification
         )


Mime
View raw message