Merge pull request #10088 from pritha-srivastava/wip_s3_signedurl_errors

rgw: Fix for using port 443 with pre-signed urls.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
Casey Bodley 2016-07-05 13:37:15 -04:00 committed by GitHub
commit 953fdecf15

View File

@ -3668,7 +3668,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;