]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: return 412 when bad limit specified on listing buckets
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 13 May 2015 16:37:18 +0000 (09:37 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 13 May 2015 16:39:03 +0000 (09:39 -0700)
Fixes: #11613
Backport: hammer
For some reason the swift api requires that. This revert a change that
was made in f7b92f9988ea64d248a2b551e0434b3225d296de.

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

index c3d09e43ab4aa7aa63f5270f44aa0da726c577d8..943d7f8cfb33cb822cd2fc31c3353678a5a226a2 100644 (file)
@@ -27,7 +27,7 @@ int RGWListBuckets_ObjStore_SWIFT::get_params()
     }
 
     if (l > (long)limit_max || l < 0) {
-      return -EINVAL;
+      return -ERR_PRECONDITION_FAILED;
     }
 
     limit = (uint64_t)l;