]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't use s->bucket for metadata api path entry
authorYehuda Sadeh <yehuda@redhat.com>
Fri, 29 Jan 2016 00:01:40 +0000 (16:01 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 22:03:20 +0000 (14:03 -0800)
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 <yehuda@redhat.com>
src/rgw/rgw_rest_metadata.cc

index f97fdb4a722667b2211cceb248e6113098492a48..724e06ff79a242d2e5cfdd9b08379383da7bc85d 100644 (file)
@@ -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();