]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't read actual data on user manifest HEAD 6160/head
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 17 Sep 2015 16:10:39 +0000 (09:10 -0700)
committerLoic Dachary <ldachary@redhat.com>
Fri, 2 Oct 2015 14:25:04 +0000 (16:25 +0200)
Fixes: #12780
We unconditionally read all the data, which is not needed
when doing HEAD operation on user manifest objects.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
(cherry picked from commit 4a8b08d1dd2511e28e999f1625103fb919fb5465)

src/rgw/rgw_op.cc

index bf6c3e7fd08485c25a441aaa835c8e0fc32dc424..4301bdde8b4c78829330d39114bdf1a01e5f69d9 100644 (file)
@@ -845,6 +845,12 @@ int RGWGetObj::handle_user_manifest(const char *prefix)
 
   s->obj_size = total_len;
 
+  if (!get_data) {
+    bufferlist bl;
+    send_response_data(bl, 0, 0);
+    return 0;
+  }
+
   r = iterate_user_manifest_parts(s->cct, store, ofs, end, bucket, obj_prefix, bucket_policy, NULL, get_obj_user_manifest_iterate_cb, (void *)this);
   if (r < 0)
     return r;