From d63544c8d5958aec658af9ae2d5f92c89fddc882 Mon Sep 17 00:00:00 2001 From: Mark Kogan Date: Thu, 6 Jun 2019 11:35:49 +0300 Subject: [PATCH] rgw: Save an unnecessary copy of RGWEnv fixes: https://tracker.ceph.com/issues/40183 Signed-off-by: Mark Kogan (cherry picked from commit 0693ec241ec40b3b7c21e9182b99213024b41049) --- src/rgw/rgw_rest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest.h b/src/rgw/rgw_rest.h index 4780f8026346..e1c8712f6ec0 100644 --- a/src/rgw/rgw_rest.h +++ b/src/rgw/rgw_rest.h @@ -730,7 +730,7 @@ static inline void dump_header_if_nonempty(struct req_state* s, static inline std::string compute_domain_uri(const struct req_state *s) { std::string uri = (!s->info.domain.empty()) ? s->info.domain : [&s]() -> std::string { - auto env = *(s->info.env); + RGWEnv const &env(*(s->info.env)); std::string uri = env.get("SERVER_PORT_SECURE") ? "https://" : "http://"; if (env.exists("SERVER_NAME")) { -- 2.47.3