libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r892029 - /incubator/libcloud/trunk/libcloud/drivers/rackspace.py
Date Fri, 18 Dec 2009 00:28:25 GMT
Author: pquerna
Date: Fri Dec 18 00:28:23 2009
New Revision: 892029

URL: http://svn.apache.org/viewvc?rev=892029&view=rev
Log:
Add a cache busting parameter to all API queries to Rackspace, to work around
their use of HTTP caching of operations for long periods.

Modified:
    incubator/libcloud/trunk/libcloud/drivers/rackspace.py

Modified: incubator/libcloud/trunk/libcloud/drivers/rackspace.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/rackspace.py?rev=892029&r1=892028&r2=892029&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/rackspace.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/rackspace.py Fri Dec 18 00:28:23 2009
@@ -18,6 +18,10 @@
 
 from zope.interface import implements
 
+import os
+from zlib import crc32
+
+import time
 import base64
 import urlparse
 
@@ -106,6 +110,8 @@
             action = self.path + action
         if method == "POST":
             headers = {'Content-Type': 'application/xml; charset=UTF-8'}
+        if method == "GET":
+          params['cache-busting'] = hex(crc32(os.urandom(16)))
         return super(RackspaceConnection, self).request(action=action,
                                                         params=params, data=data,
                                                         method=method, headers=headers)



Mime
View raw message