]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw:swift use Civetweb ssl can not get right url 6491/head
authorWeijun Duan <duanweijun@h3c.com>
Fri, 30 Oct 2015 01:46:02 +0000 (21:46 -0400)
committerNathan Cutler <ncutler@suse.com>
Sat, 7 Nov 2015 10:22:05 +0000 (11:22 +0100)
Fixes: #13628
Signed-off-by: Weijun Duan <duanweijun@h3c.com>
(cherry picked from commit e0fd540bf441e2f8276cbd96c601a0539892efe2)

src/rgw/rgw_civetweb.cc

index 81e504c5f9b1dd60c5554994a32a3b810b0e9506..5c075f98a0e749230a7cedc689d8de638d8618f8 100644 (file)
@@ -127,6 +127,13 @@ void RGWMongoose::init_env(CephContext *cct)
   char port_buf[16];
   snprintf(port_buf, sizeof(port_buf), "%d", port);
   env.set("SERVER_PORT", port_buf);
+
+  if (info->is_ssl) {
+    if (port == 0) {
+      strcpy(port_buf,"443");
+    }
+    env.set("SERVER_PORT_SECURE", port_buf);
+  }
 }
 
 int RGWMongoose::send_status(const char *status, const char *status_name)