From: Pritha Srivastava Date: Fri, 1 Jul 2016 08:45:42 +0000 (+0530) Subject: rgw: Fix for using port 443 with pre-signed urls. X-Git-Tag: ses5-milestone5~502^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10088%2Fhead;p=ceph.git rgw: Fix for using port 443 with pre-signed urls. Fixes http://tracker.ceph.com/issues/16548 Signed-off-by: Pritha Srivastava --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 1d64aa061a7..fdb2fffc84e 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -3665,7 +3665,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;