From: Yehuda Sadeh Date: Fri, 29 Jan 2016 00:01:40 +0000 (-0800) Subject: rgw: don't use s->bucket for metadata api path entry X-Git-Tag: v10.1.0~378^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d5ae7f86a52b29a67c5633caa0f2e90bddaf71d1;p=ceph.git rgw: don't use s->bucket for metadata api path entry Fixes #14549 s->bucket is only initialized at the object store handler (post auth callback). We don't want to initialize it for other cases because it's not a real bucket, and initializing it will require going through the authorization path for this 'bucket'. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_rest_metadata.cc b/src/rgw/rgw_rest_metadata.cc index f97fdb4a7226..724e06ff79a2 100644 --- a/src/rgw/rgw_rest_metadata.cc +++ b/src/rgw/rgw_rest_metadata.cc @@ -32,8 +32,8 @@ static inline void frame_metadata_key(req_state *s, string& out) { string key = s->info.args.get("key", &exists); string section; - if (!s->bucket_name.empty()) { - section = s->bucket_name; + if (!s->init_state.url_bucket.empty()) { + section = s->init_state.url_bucket; } else { section = key; key.clear();