Updated Branches:
  refs/heads/trunk beec33c4f -> 16f2fd6d1

Modify Connection.request to create a shallow copy of "params" and "headers" 
argument before mutating it.


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

Branch: refs/heads/trunk
Commit: cf951ffe3238977fbb25610902493253a3133e96
Parents: beec33c
Author: Tomaz Muraus <[email protected]>
Authored: Wed Oct 30 19:27:00 2013 +0100
Committer: Tomaz Muraus <[email protected]>
Committed: Wed Oct 30 19:27:00 2013 +0100

----------------------------------------------------------------------
 libcloud/common/base.py | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/cf951ffe/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index 3d6a9dc..9a90dec 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -15,6 +15,7 @@
 
 import sys
 import ssl
+import copy
 import time
 
 from xml.etree import ElementTree as ET
@@ -546,9 +547,13 @@ class Connection(object):
         """
         if params is None:
             params = {}
+        else:
+            params = copy.copy(params)
 
         if headers is None:
             headers = {}
+        else:
+            headers = copy.copy(headers)
 
         action = self.morph_action_hook(action)
         self.action = action

Reply via email to