浏览代码

[raz] Properly bundle the Raz request arguments

Romain Rigaux 4 年之前
父节点
当前提交
d2a8172c19
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      desktop/core/src/desktop/lib/raz/raz_client.py

+ 4 - 4
desktop/core/src/desktop/lib/raz/raz_client.py

@@ -83,16 +83,16 @@ class RazClient(object):
     self.requestid = str(uuid.uuid4())
     self.requestid = str(uuid.uuid4())
 
 
   def check_access(self, method, url, params=None, headers=None):
   def check_access(self, method, url, params=None, headers=None):
-    LOG.debug("Check access: method {%s}, header: {%s}" % (method, headers))
+    LOG.debug("Check access: method {%s}, url {%s}, params {%s}, headers {%s}" % (method, url, params, headers))
 
 
     path = lib_urlparse(url)
     path = lib_urlparse(url)
     url_params = dict([p.split('=') for p in path.query.split('&') if path.query])
     url_params = dict([p.split('=') for p in path.query.split('&') if path.query])
     params = params if params is not None else {}
     params = params if params is not None else {}
     headers = headers if headers is not None else {}
     headers = headers if headers is not None else {}
 
 
-    allparams = [raz_signer.StringListStringMapProto(key=key, value=val) for key, val in url_params.items()]
-    allparams.extend([raz_signer.StringListStringMapProto(key=key, value=val) for key, val in params.items()])
-    headers = [raz_signer.StringStringMapProto(key=key, value=val) for key, val in headers.items()]
+    allparams = [raz_signer.StringListStringMapProto(key=key, value=[val]) for key, val in url_params.items()]
+    allparams.extend([raz_signer.StringListStringMapProto(key=key, value=[val]) for key, val in params.items()])
+    headers = [raz_signer.StringStringMapProto(key=key, value=[val]) for key, val in headers.items()]
     endpoint = "%s://%s" % (path.scheme, path.netloc)
     endpoint = "%s://%s" % (path.scheme, path.netloc)
     resource_path = path.path.lstrip("/")
     resource_path = path.path.lstrip("/")