rgw: REST client, don't sign requests if empty key

If key is not passed in, don't try to sign the request.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
Yehuda Sadeh 2016-08-17 01:44:02 -07:00
parent 90ccfbfb63
commit 0df0eabc41

View File

@ -208,6 +208,11 @@ void RGWRESTSimpleRequest::get_params_str(map<string, string>& extra_args, strin
int RGWRESTSimpleRequest::sign_request(RGWAccessKey& key, RGWEnv& env, req_info& info)
{
/* don't sign if no key is provided */
if (key.key.empty()) {
return 0;
}
map<string, string, ltstr_nocase>& m = env.get_map();
if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {