From 9d69c14c6f7e9ce5fe34acb32bcdf4d01c59cba0 Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Wed, 3 Jul 2019 10:14:21 +0530 Subject: [PATCH] rgw: drop getting list-type when get_data is false Signed-off-by: Jos Collin (cherry picked from commit ae56a918174cc6899bf7384004560ea57036b009) --- src/rgw/rgw_rest_s3.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 5cd6f238b11d6..0a28abaeb4556 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -3523,11 +3523,9 @@ RGWOp *RGWHandler_REST_Service_S3::op_post() RGWOp *RGWHandler_REST_Bucket_S3::get_obj_op(bool get_data) { // Non-website mode - int list_type = 1; - s->info.args.get_int("list-type", &list_type, 1); - - // Non-website mode // Non-website mode if (get_data) { + int list_type = 1; + s->info.args.get_int("list-type", &list_type, 1); switch (list_type) { case 1: return new RGWListBucket_ObjStore_S3; -- 2.39.5