]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't read actual data on user manifest HEAD 5996/head
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 17 Sep 2015 16:10:39 +0000 (09:10 -0700)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 18 Sep 2015 16:56:36 +0000 (18:56 +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>
src/rgw/rgw_op.cc

index c3827714d0f1e9e8f10722774b53de420a54f7a2..e59f7e143fd898ef6a7d0b7823f5c6fbe4e740fb 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;