From: Mark Kogan Date: Thu, 6 Jun 2019 08:35:49 +0000 (+0300) Subject: rgw: Save an unnecessary copy of RGWEnv X-Git-Tag: v13.2.7~77^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=75b309d15d2a0a89451941025e34d3380b74f5a4;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 c171a853fb10b..672c0069cb56f 100644 --- a/src/rgw/rgw_rest.h +++ b/src/rgw/rgw_rest.h @@ -716,7 +716,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")) {