]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Save an unnecessary copy of RGWEnv 29483/head
authorMark Kogan <mkogan@redhat.com>
Thu, 6 Jun 2019 08:35:49 +0000 (11:35 +0300)
committerPrashant D <pdhange@redhat.com>
Mon, 5 Aug 2019 02:24:16 +0000 (22:24 -0400)
fixes: https://tracker.ceph.com/issues/40183

Signed-off-by: Mark Kogan <mkogan@redhat.com>
(cherry picked from commit 0693ec241ec40b3b7c21e9182b99213024b41049)

src/rgw/rgw_rest.h

index c171a853fb10b39705c528d0d3a6112b405fef8b..672c0069cb56f7733fbfc907c949e2aeb519f726 100644 (file)
@@ -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")) {