]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't add port to url if already has one
authorYehuda Sadeh <yehuda@inktank.com>
Mon, 15 Oct 2012 16:43:47 +0000 (09:43 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 16 Oct 2012 19:25:42 +0000 (12:25 -0700)
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>
src/rgw/rgw_swift_auth.cc

index d098c47d4d9f1e25116f6dd7bbad908318aa94eb..2678a0a5342a48745224b6b72b33fdebd730d23a 100644 (file)
@@ -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);
     }