From 0219774408d1f6aab66a37765e555e369301e0d7 Mon Sep 17 00:00:00 2001 From: Babu Shanmugam Date: Tue, 30 Apr 2013 09:15:34 +0530 Subject: [PATCH] Removed the check for parameter validation in op_get() Signed-off-by: Babu Shanmugam --- src/rgw/rgw_common.cc | 3 +-- src/rgw/rgw_rest_metadata.cc | 4 ---- src/test/test_rgw_admin_meta.cc | 3 --- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index 32e127eedb43f..43cab394db935 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -447,8 +447,7 @@ int XMLArgs::parse() if (ret >= 0) { string& name = nv.get_name(); string& val = nv.get_val(); - if(name.length() > 0) - val_map[name] = val; + val_map[name] = val; if ((name.compare("acl") == 0) || (name.compare("location") == 0) || diff --git a/src/rgw/rgw_rest_metadata.cc b/src/rgw/rgw_rest_metadata.cc index 1ec6a65c940dd..a0a79eb752c4d 100644 --- a/src/rgw/rgw_rest_metadata.cc +++ b/src/rgw/rgw_rest_metadata.cc @@ -159,10 +159,6 @@ void RGWOp_Metadata_Delete::execute() { } RGWOp *RGWHandler_Metadata::op_get() { - if (s->args.get_num_params() > 0 && - !s->args.exists("key")) { - return NULL; - } if (s->args.exists("key")) return new RGWOp_Metadata_Get; else diff --git a/src/test/test_rgw_admin_meta.cc b/src/test/test_rgw_admin_meta.cc index 7cfc53f18e809..5f811a97bf82f 100644 --- a/src/test/test_rgw_admin_meta.cc +++ b/src/test/test_rgw_admin_meta.cc @@ -651,9 +651,6 @@ TEST(TestRGWAdmin, meta_get){ ASSERT_EQ(0, user_info(uid, display_name, info)); - /*Check with a wrong parameter*/ - g_test->send_request(string("GET"), string("/admin/metadata/user?keys=test")); - EXPECT_EQ(405U, g_test->get_resp_code()); g_test->send_request(string("GET"), string("/admin/metadata/user?key=test")); EXPECT_EQ(404U, g_test->get_resp_code()); -- 2.39.5