From 22c9df1d9bef3f48ab2a12357035fc54fbde141d Mon Sep 17 00:00:00 2001 From: Pritha Srivastava Date: Fri, 1 Jul 2016 14:15:42 +0530 Subject: [PATCH] rgw: Fix for using port 443 with pre-signed urls. Fixes http://tracker.ceph.com/issues/16548 Signed-off-by: Pritha Srivastava (cherry picked from commit 44b9ed37ac659d83fbd4bb99c69da6b9dec06b8d) --- src/rgw/rgw_rest_s3.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 27ae9e696ab57..46ffb208acdac 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -3484,7 +3484,7 @@ int RGW_Auth_S3::authorize_v4(RGWRados *store, struct req_state *s) } string token_value = string(t); if (using_qs && (token == "host")) { - if (!port.empty() && port != "80") { + if (!port.empty() && port != "80" && port != "0") { token_value = token_value + ":" + port; } else if (!secure_port.empty() && secure_port != "443") { token_value = token_value + ":" + secure_port;