From: Weijun Duan Date: Fri, 30 Oct 2015 01:46:02 +0000 (-0400) Subject: rgw:swift use Civetweb ssl can not get right url X-Git-Tag: v0.94.6~52^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6491%2Fhead;p=ceph.git rgw:swift use Civetweb ssl can not get right url Fixes: #13628 Signed-off-by: Weijun Duan (cherry picked from commit e0fd540bf441e2f8276cbd96c601a0539892efe2) --- diff --git a/src/rgw/rgw_civetweb.cc b/src/rgw/rgw_civetweb.cc index 81e504c5f9b1..5c075f98a0e7 100644 --- a/src/rgw/rgw_civetweb.cc +++ b/src/rgw/rgw_civetweb.cc @@ -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)