bug 6105: default to mode http if the public port is 80

This commit is contained in:
Chiradeep Vittal 2010-09-30 15:55:17 -07:00
parent 69608275d8
commit 1a09e5de6b
1 changed files with 8 additions and 0 deletions

View File

@ -117,6 +117,14 @@ public class HAProxyConfigurator implements LoadBalancerConfigurator {
sb = new StringBuilder();
sb.append("\t").append("balance ").append(algorithm);
result.add(sb.toString());
if (publicPort.equals("80")) {
sb = new StringBuilder();
sb.append("\t").append("mode http");
result.add(sb.toString());
sb = new StringBuilder();
sb.append("\t").append("option httpclose");
result.add(sb.toString());
}
int i=0;
for (FirewallRuleVO rule: fwRules) {
//add line like this: "server 65_37_141_30-80_3 10.1.1.4:80 check"