From fae360f0e419266b80f001a25a6864668e772d08 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Fri, 20 May 2016 16:00:33 -0700 Subject: [PATCH] rgw: fix manager selection when APIs customized When modifying rgw_enable_apis per RGW instance, such as for staticsites, you can end up with RESTManager instance being null in some cases, which returns a HTTP 405 MethodNotAllowed to all requests. Example configuration to trigger the bug: rgw_enable_apis = s3website Backport: jewel X-Note: Patch from Yehuda in private IRC discussion, 2016/05/20. Fixes: http://tracker.ceph.com/issues/15973 Fixes: http://tracker.ceph.com/issues/15974 Signed-off-by: Robin H. Johnson (cherry picked from commit 7c7a465b55f7100eab0f140bf54f9420abd1c776) --- src/rgw/rgw_rest.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index a165b65692f6..538d5c7d4199 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -1539,9 +1539,6 @@ RGWRESTMgr *RGWRESTMgr::get_resource_mgr(struct req_state *s, const string& uri, { *out_uri = uri; - if (resources_by_size.empty()) - return this; - multimap::reverse_iterator iter; for (iter = resources_by_size.rbegin(); iter != resources_by_size.rend(); ++iter) { -- 2.47.3