Re: 1.4.4 option http-pretend-keepalive not available in backend

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 27 Apr 2010 22:22:46 +0200


On Mon, Apr 26, 2010 at 11:00:36PM +0100, Matt wrote:
> The doc says that http-pretend-keepalive can be set in a backend only, but
> when haproxy is reloaded with this option set :-
>
> 'http-pretend-keepalive' ignored because backend xxxx has no frontend
> capability.

grrr... looks like a stupid bug. The doc says it can be set both in frontends and backends, but the conf parser is wrong :

+ { "http-pretend-keepalive", PR_O2_FAKE_KA, PR_CAP_FE, 0, PR_MODE_HTTP },

The following patch should fix it. Thanks for reporting this Matt! Willy

diff --git a/src/cfgparse.c b/src/cfgparse.c index ebba4df..0e36050 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -150,7 +150,7 @@ static const struct cfg_opt cfg_opts2[] =

 	{ "tcp-smart-connect",            PR_O2_SMARTCON,  PR_CAP_BE, 0, 0 },
 	{ "independant-streams",          PR_O2_INDEPSTR,  PR_CAP_FE|PR_CAP_BE, 0, 0 },
 	{ "http-use-proxy-header",        PR_O2_USE_PXHDR, PR_CAP_FE, 0, PR_MODE_HTTP },
-	{ "http-pretend-keepalive",       PR_O2_FAKE_KA,   PR_CAP_FE, 0, PR_MODE_HTTP },
+	{ "http-pretend-keepalive",       PR_O2_FAKE_KA,   PR_CAP_FE|PR_CAP_BE, 0, PR_MODE_HTTP },
 	{ NULL, 0, 0, 0 }

 };   Received on 2010/04/27 22:22

This archive was generated by hypermail 2.2.0 : 2010/04/27 22:30 CEST