]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix opslog can not record remote_addr 16860/head
authorJiaying Ren <jiaying.ren@umcloud.com>
Mon, 7 Aug 2017 07:55:19 +0000 (15:55 +0800)
committerJiaying Ren <jiaying.ren@umcloud.com>
Thu, 10 Aug 2017 02:08:16 +0000 (10:08 +0800)
Fixes: http://tracker.ceph.com/issues/20931
Reported-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
Signed-off-by: Jiaying Ren <jiaying.ren@umcloud.com>
src/rgw/rgw_civetweb.cc

index 93a8a030ac007d660ad664118437688d7c8c0995..110a891ca9229925064e587a9cd9aaf2c67a000e 100644 (file)
@@ -110,6 +110,7 @@ void RGWCivetWeb::init_env(CephContext *cct)
     env.set(buf, value);
   }
 
+  env.set("REMOTE_ADDR", info->remote_addr);
   env.set("REQUEST_METHOD", info->request_method);
   env.set("REQUEST_URI", info->request_uri); // get the full uri, we anyway handle abs uris later
   env.set("SCRIPT_URI", info->uri); /* FIXME */