]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
ensure that a special first param is respected
authorAlfredo Deza <alfredo.deza@inktank.com>
Wed, 17 Dec 2014 22:42:08 +0000 (17:42 -0500)
committerJosh Durgin <jdurgin@redhat.com>
Thu, 18 Dec 2014 17:05:12 +0000 (09:05 -0800)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
radosgw_agent/request.py

index 27d10ace4d7fbd324923509be8f51b6b6b9232df..99bf12484a1c83060259afd797577b4167d84b69 100644 (file)
@@ -75,7 +75,9 @@ def make_request(conn, method, basepath='', resource='', headers=None,
                     result.append(
                         (k.encode('utf-8') if isinstance(k, str) else k,
                          v.encode('utf-8') if isinstance(v, str) else v))
-        md.path = '%s?%s' % (md.path, urlencode(result, doseq=True))
+        if md.special_first_param:
+        appending_char = '&' if md.special_first_param else '?'
+            md.path = '%s%s%s' % (md.path, appending_char, urlencode(result, doseq=True))
 
     return AWSAuthConnection.make_request(
         md.conn, md.method, md.path,