You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/10/05 07:37:59 UTC
[09/22] libcloud git commit: Added comment on add_default_headers
method. Closes #881
Added comment on add_default_headers method.
Closes #881
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/686b971b
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/686b971b
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/686b971b
Branch: refs/heads/trunk
Commit: 686b971babc216c3339ee1e1b32e917758891891
Parents: 0a0f1e0
Author: lpkearns <lo...@gmail.com>
Authored: Sat Oct 1 00:22:03 2016 -0700
Committer: Anthony Shaw <an...@apache.org>
Committed: Wed Oct 5 18:37:01 2016 +1100
----------------------------------------------------------------------
libcloud/common/google.py | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/686b971b/libcloud/common/google.py
----------------------------------------------------------------------
diff --git a/libcloud/common/google.py b/libcloud/common/google.py
index 74bb528..52577b8 100644
--- a/libcloud/common/google.py
+++ b/libcloud/common/google.py
@@ -344,6 +344,9 @@ class GoogleBaseAuthConnection(ConnectionUserAndKey):
super(GoogleBaseAuthConnection, self).__init__(user_id, key, **kwargs)
def add_default_headers(self, headers):
+ """
+ Add defaults for 'Content-Type' and 'Host' headers.
+ """
headers['Content-Type'] = "application/x-www-form-urlencoded"
headers['Host'] = self.host
return headers