From b86d87cd032411165f9a197b00c6f5c8baef8f75 Mon Sep 17 00:00:00 2001 From: thompsa Date: Wed, 10 Feb 2010 08:54:10 +1300 Subject: 'cookie' can not be specified in non-http mode. --- config/haproxy-dev/haproxy.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc index 48ceacaf..97e33609 100644 --- a/config/haproxy-dev/haproxy.inc +++ b/config/haproxy-dev/haproxy.inc @@ -248,7 +248,7 @@ function haproxy_configure() { if ($backend['pool'] == $pool['name'] && is_array($pool['ha_servers']['item'])) { if($pool['status'] != 'active') continue; - if($pool['cookie_name']) + if($pool['cookie_name'] && strtolower($backend['type']) == "http") fwrite ($fd, "\tcookie\t\t\t" . $pool['cookie_name'] . " insert indirect\n"); $uri = $pool['monitor_uri']; @@ -258,7 +258,7 @@ function haproxy_configure() { $uri = "/"; fwrite ($fd, "\toption\t\t\t{$httpchk} HEAD " . $uri . " HTTP/1.0\n"); - if($pool['cookie']) + if($pool['cookie'] && strtolower($backend['type']) == "http") $cookie = " cookie {$pool['cookie']} "; else $cookie = ""; -- cgit v1.2.3