]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
fixup! rgw: RGWSetRequestPayment request should be forwarded to master zone 28276/head
authorChang Liu <liuchang0812@gmail.com>
Fri, 14 Jun 2019 06:42:45 +0000 (14:42 +0800)
committerChang Liu <liuchang0812@gmail.com>
Fri, 14 Jun 2019 06:42:45 +0000 (14:42 +0800)
Signed-off-by: Chang Liu <liuchang0812@gmail.com>
src/rgw/rgw_rest_s3.cc

index b0533a5486656800b4a02991890855f57605fc3d..b07612d48ae23ff3bcadfb803606c0640d94fb34 100644 (file)
@@ -2595,14 +2595,12 @@ int RGWSetRequestPayment_ObjStore_S3::get_params()
   const auto max_size = s->cct->_conf->rgw_max_put_param_size;
 
   int r = 0;
-  bufferlist data;
-  std::tie(r, data) = rgw_rest_read_all_input(s, max_size, false);
+  std::tie(r, in_data) = rgw_rest_read_all_input(s, max_size, false);
 
   if (r < 0) {
     return r;
   }
 
-  in_data.append(data);
 
   RGWSetRequestPaymentParser parser;
 
@@ -2611,8 +2609,8 @@ int RGWSetRequestPayment_ObjStore_S3::get_params()
     return -EIO;
   }
 
-  char* buf = data.c_str();
-  if (!parser.parse(buf, data.length(), 1)) {
+  char* buf = in_data.c_str();
+  if (!parser.parse(buf, in_data.length(), 1)) {
     ldpp_dout(this, 10) << "failed to parse data: " << buf << dendl;
     return -EINVAL;
   }