]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: adjust return code if can't find upload 4408/head
authorYehuda Sadeh <yehuda@redhat.com>
Mon, 20 Apr 2015 22:01:34 +0000 (15:01 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 20 Apr 2015 22:01:34 +0000 (15:01 -0700)
Fixes: #11436
Return NoSuchUpload (instead of NoSuchKey).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_op.cc

index 1ab9049f0844a322ad486eb761fb448353ac426f..ddd27b0497c31e26be5c63126f65174b646ed599 100644 (file)
@@ -2806,8 +2806,12 @@ static int get_multipart_info(RGWRados *store, struct req_state *s, string& meta
   obj.set_in_extra_data(true);
 
   int ret = get_obj_attrs(store, s, obj, attrs);
-  if (ret < 0)
+  if (ret < 0) {
+    if (ret == -ENOENT) {
+      return -ERR_NO_SUCH_UPLOAD;
+    }
     return ret;
+  }
 
   if (policy) {
     for (iter = attrs.begin(); iter != attrs.end(); ++iter) {