From: Mark Kogan Date: Thu, 6 Jun 2019 08:35:49 +0000 (+0300) Subject: rgw: Save an unnecessary copy of RGWEnv X-Git-Tag: v14.2.3~146^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F29205%2Fhead;p=ceph.git rgw: Save an unnecessary copy of RGWEnv fixes: https://tracker.ceph.com/issues/40183 Signed-off-by: Mark Kogan (cherry picked from commit 0693ec241ec40b3b7c21e9182b99213024b41049) --- 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")) {