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 <jlk@stratosec.co> 1400052371 -0700
This commit is contained in:
John Kinsella 2014-05-14 00:26:11 -07:00
parent 76872f6283
commit 156bd9b885

View File

@ -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;