You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2012/02/18 09:30:22 UTC

svn commit: r1245889 - /libcloud/trunk/libcloud/common/base.py

Author: tomaz
Date: Sat Feb 18 08:30:22 2012
New Revision: 1245889

URL: http://svn.apache.org/viewvc?rev=1245889&view=rev
Log:
Fix curl command which is logged when using debug mode to reflect the actual
protocol (http, https) which is used inside the url.

Modified:
    libcloud/trunk/libcloud/common/base.py

Modified: libcloud/trunk/libcloud/common/base.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/base.py?rev=1245889&r1=1245888&r2=1245889&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/base.py (original)
+++ libcloud/trunk/libcloud/common/base.py Sat Feb 18 08:30:22 2012
@@ -290,8 +290,7 @@ class LoggingConnection():
             cmd.extend(["--data-binary", pquote(body)])
 
         cmd.extend(["--compress"])
-
-        cmd.extend([pquote("https://%s:%d%s" % (self.host, self.port, url))])
+        cmd.extend([pquote("%s://%s:%d%s" % (self.protocol, self.host, self.port, url))])
         return " ".join(cmd)
 
 class LoggingHTTPSConnection(LoggingConnection, LibcloudHTTPSConnection):
@@ -299,6 +298,8 @@ class LoggingHTTPSConnection(LoggingConn
     Utility Class for logging HTTPS connections
     """
 
+    protocol = 'https'
+
     def getresponse(self):
         r = LibcloudHTTPSConnection.getresponse(self)
         if self.log is not None:
@@ -322,6 +323,8 @@ class LoggingHTTPConnection(LoggingConne
     Utility Class for logging HTTP connections
     """
 
+    protocol = 'http'
+
     def getresponse(self):
         r = LibcloudHTTPConnection.getresponse(self)
         if self.log is not None: