diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2012-10-15 09:43:47 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2012-10-16 12:25:42 -0700 |
commit | 5a3076fd51706e32bc55b734099037520299003b (patch) | |
tree | 9a269495b40592f555154964a8ed49c66e723640 | |
parent | d76b71caa99a39035ea6ed9db6ca0994975d38af (diff) | |
download | ceph-5a3076fd51706e32bc55b734099037520299003b.tar.gz |
rgw: don't add port to url if already has one
Fixes: #3296
Specifically, is host name string already has ':', then
don't try to append theport (swift auth).
backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/rgw/rgw_swift_auth.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index d098c47d4d9..2678a0a5342 100644 --- a/src/rgw/rgw_swift_auth.cc +++ b/src/rgw/rgw_swift_auth.cc @@ -174,7 +174,7 @@ void RGW_SWIFT_Auth_Get::execute() swift_url = protocol; swift_url.append("://"); swift_url.append(host); - if (add_port) { + if (add_port && !strchr(host, ':')) { swift_url.append(":"); swift_url.append(server_port); } |