diff options
author | lvshanchun <lvshanchun@gmail.com> | 2017-11-21 06:03:09 +0100 |
---|---|---|
committer | Yehuda Sadeh <yehuda@redhat.com> | 2018-04-10 17:05:39 +0200 |
commit | 38550a10cfc8bf9db1f9943976330a47e1e85527 (patch) | |
tree | 654274bb12b78a4254c3fa368ac7f04e59cf63e6 /src/rgw/rgw_rest_conn.cc | |
parent | rgw: avoid returning CURL_READFUNC_PAUSE forever (diff) | |
download | ceph-38550a10cfc8bf9db1f9943976330a47e1e85527.tar.xz ceph-38550a10cfc8bf9db1f9943976330a47e1e85527.zip |
rgw: add populate_zonegroup() and populate_uid() in RGWRESTConn
populate_params() is too generic, add populate_zonegroup() and
populate_uid() in RGWRESTConn, then have populate_params() call them.
Signed-off-by: lvshanchun <lvshanchun@gmail.com>
Diffstat (limited to 'src/rgw/rgw_rest_conn.cc')
-rw-r--r-- | src/rgw/rgw_rest_conn.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/rgw/rgw_rest_conn.cc b/src/rgw/rgw_rest_conn.cc index fc4cda6e852..531da9e6d33 100644 --- a/src/rgw/rgw_rest_conn.cc +++ b/src/rgw/rgw_rest_conn.cc @@ -83,15 +83,8 @@ string RGWRESTConn::get_url() void RGWRESTConn::populate_params(param_vec_t& params, const rgw_user *uid, const string& zonegroup) { - if (uid) { - string uid_str = uid->to_str(); - if (!uid->empty()) { - params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "uid", uid_str)); - } - } - if (!zonegroup.empty()) { - params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "zonegroup", zonegroup)); - } + populate_uid(params, uid); + populate_zonegroup(params, zonegroup); } int RGWRESTConn::forward(const rgw_user& uid, req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl) |