Repository: cloudstack Updated Branches: refs/heads/4.3-forward 76872f628 -> 156bd9b88
Applying missed patch from CLOUDSTACK-6204 Was brought to my attention that when I manually applied the CLOUDSTACK-6204 patch to 4.3-forward, somehow the changes for ConsoleProxyInof.java were missed. Fixing that here. BUG-ID: CLOUDSTACK-6204 Bugfix-for: 4.3 (exists in 0e57b75 on master) Signed-off-by: John Kinsella <j...@stratosec.co> 1400052371 -0700 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/156bd9b8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/156bd9b8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/156bd9b8 Branch: refs/heads/4.3-forward Commit: 156bd9b88589897f7a3c102104fc7cbe29354251 Parents: 76872f6 Author: John Kinsella <j...@stratosec.co> Authored: Wed May 14 00:26:11 2014 -0700 Committer: John Kinsella <j...@stratosec.co> Committed: Wed May 14 00:26:11 2014 -0700 ---------------------------------------------------------------------- core/src/com/cloud/info/ConsoleProxyInfo.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/156bd9b8/core/src/com/cloud/info/ConsoleProxyInfo.java ---------------------------------------------------------------------- diff --git a/core/src/com/cloud/info/ConsoleProxyInfo.java b/core/src/com/cloud/info/ConsoleProxyInfo.java index 3439f3d..096302c 100644 --- a/core/src/com/cloud/info/ConsoleProxyInfo.java +++ b/core/src/com/cloud/info/ConsoleProxyInfo.java @@ -32,17 +32,17 @@ public class ConsoleProxyInfo { this.sslEnabled = sslEnabled; if(sslEnabled) { - StringBuffer sb = new StringBuffer(proxyIpAddress); - for(int i = 0; i < sb.length(); i++) - if(sb.charAt(i) == '.') - sb.setCharAt(i, '-'); - if(consoleProxyUrlDomain!=null && consoleProxyUrlDomain.length()>0) - { - sb.append("."); - sb.append(consoleProxyUrlDomain); - } - else + StringBuffer sb = new StringBuffer(); + if (consoleProxyUrlDomain.startsWith("*")) { + sb.append(proxyIpAddress); + for (int i = 0; i < proxyIpAddress.length(); i++) + if (sb.charAt(i) == '.') + sb.setCharAt(i, '-'); + sb.append(consoleProxyUrlDomain.substring(1)); //skip the * + } else { + //LB address sb.append(".realhostip.com"); + } proxyAddress = sb.toString(); proxyPort = port;