From d139a297c69528d10290ca9dfee841674e0c9546 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 21 Jan 2010 10:38:19 -0500 Subject: Correctly enable/disable httpclose and forwardfor options --- config/haproxy/haproxy.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc index 8d477b64..034e3f9d 100644 --- a/config/haproxy/haproxy.inc +++ b/config/haproxy/haproxy.inc @@ -169,8 +169,12 @@ function haproxy_configure() { fwrite ($fd, "\tmode\t\t\t" . $backend_type . "\n"); fwrite ($fd, "\tlog\t\t\tglobal\n"); fwrite ($fd, "\toption\t\t\tdontlognull\n"); - fwrite ($fd, "\toption\t\t\thttpclose\n"); - fwrite ($fd, "\toption\t\t\tforwardfor\n"); + + if($backend['httpclose']) + fwrite ($fd, "\toption\t\t\thttpclose\n"); + + if($backend['forwardfor']) + fwrite ($fd, "\toption\t\t\tforwardfor\n"); if($backend['max_connections']) fwrite ($fd, "\tmaxconn\t\t\t" . $backend['max_connections'] . "\n"); -- cgit v1.2.3