You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by pq...@apache.org on 2010/08/13 01:24:33 UTC
svn commit: r985034 - /incubator/libcloud/trunk/libcloud/base.py
Author: pquerna
Date: Thu Aug 12 23:24:33 2010
New Revision: 985034
URL: http://svn.apache.org/viewvc?rev=985034&view=rev
Log:
Don't unconditionally append a ? to urls without query args.
Submitted by: Tomaz Muraus <tomaz cloudkick.com>
Modified:
incubator/libcloud/trunk/libcloud/base.py
Modified: incubator/libcloud/trunk/libcloud/base.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/base.py?rev=985034&r1=985033&r2=985034&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/base.py (original)
+++ incubator/libcloud/trunk/libcloud/base.py Thu Aug 12 23:24:33 2010
@@ -422,7 +422,11 @@ class ConnectionKey(object):
if data != '':
data = self.encode_data(data)
headers.update({'Content-Length': str(len(data))})
- url = '?'.join((action, urllib.urlencode(params)))
+
+ if params:
+ url = '?'.join((action, urllib.urlencode(params)))
+ else:
+ url = action
# Removed terrible hack...this a less-bad hack that doesn't execute a
# request twice, but it's still a hack.