]> git.apps.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>
Mon, 15 Oct 2012 16:59:14 +0000 (09:59 -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 90990d957511a2e3e0d2fda2c91903a2628463a2..47390fb48c12995904e432ab5b5381aded44759a 100644 (file)
@@ -168,7 +168,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);
     }