cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jburw...@apache.org
Subject git commit: updated refs/heads/master to c713aef
Date Thu, 01 Aug 2013 08:29:28 GMT
Updated Branches:
  refs/heads/master d571b49d0 -> c713aef04


- CLOUDSTACK-3229: Adds a guard condition to s3xen to prevent  double
  "/" in the resource path if the key starts with a "/" and corrects a
log message from adding an additional "/"


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

Branch: refs/heads/master
Commit: c713aef04de5d42de2ad3f2865865ac99e6dd641
Parents: d571b49
Author: John Burwell <jburwell@apache.org>
Authored: Thu Aug 1 04:27:30 2013 -0400
Committer: John Burwell <jburwell@apache.org>
Committed: Thu Aug 1 04:29:23 2013 -0400

----------------------------------------------------------------------
 scripts/vm/hypervisor/xenserver/s3xen | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c713aef0/scripts/vm/hypervisor/xenserver/s3xen
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/s3xen b/scripts/vm/hypervisor/xenserver/s3xen
index 454097b..2798e2b 100644
--- a/scripts/vm/hypervisor/xenserver/s3xen
+++ b/scripts/vm/hypervisor/xenserver/s3xen
@@ -184,7 +184,12 @@ class S3Client(object):
             max_error_retry, self.DEFAULT_MAX_ERROR_RETRY)
 
     def build_canocialized_resource(self, bucket, key):
-        return "/" + join([bucket, key], "/")
+        if not key.startswith("/"):
+            uri = bucket + "/" + key
+        else:
+            uri = bucket + key
+
+        return "/" + uri
 
     def noop_send_body(connection):
         pass
@@ -205,9 +210,6 @@ class S3Client(object):
         headers['Date'] = request_date
 
         def perform_request():
-            print "method=", method, ", uri=", uri, ", headers=", headers,
-            " endpoint=", self.end_point
-
             connection = None
             if self.https_flag:
                 connection = HTTPSConnection(self.end_point)
@@ -225,7 +227,7 @@ class S3Client(object):
                 fn_send_body(connection)
 
                 response = connection.getresponse()
-                log("Sent " + method + " request to " + self.end_point + "/" +
+                log("Sent " + method + " request to " + self.end_point +
                     uri + " with headers " + str(headers) +
                     ".  Received response status " + str(response.status) +
                     ": " + response.reason)


Mime
View raw message