]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw : add URL encode toward bucket name in metadata sync 35122/head
authorcaolei <halei15848934852@163.com>
Wed, 20 May 2020 10:14:02 +0000 (18:14 +0800)
committercaolei <halei15848934852@163.com>
Wed, 20 May 2020 10:14:02 +0000 (18:14 +0800)
Signed-off-by: caolei <halei15848934852@163.com>
src/rgw/rgw_sync.cc

index 862382c6f4cff5cba272071d37ce030804fc7abe..ea10cff40e79ec2508fac415b80c0889bdacd432 100644 (file)
@@ -1049,10 +1049,12 @@ public:
     RGWRESTConn *conn = sync_env->conn;
     reenter(this) {
       yield {
+        string key_encode;
+        url_encode(key, key_encode);
         rgw_http_param_pair pairs[] = { { "key" , key.c_str()},
                                        { NULL, NULL } };
 
-        string p = string("/admin/metadata/") + section + "/" + key;
+        string p = string("/admin/metadata/") + section + "/" + key_encode;
 
         http_op = new RGWRESTReadResource(conn, p, pairs, NULL, sync_env->http_manager);