From: Willy Tarreau Date: Tue, 19 Nov 2024 07:27:47 +0000 (+0100) Subject: REGTESTS: silence warning "L6 sample fetches ignored" in cond_set_var X-Git-Tag: v3.1-dev14~119 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52b72ec3ba27cd89716648524ed273ab93004188;p=thirdparty%2Fhaproxy.git REGTESTS: silence warning "L6 sample fetches ignored" in cond_set_var This reg-test uses req.len in an HTTP backend. It does work but emits a warning suggesting that this is ignored, so most likely its days are counted now. Let's just use req.hdrs,length instead. --- diff --git a/reg-tests/sample_fetches/cond_set_var.vtc b/reg-tests/sample_fetches/cond_set_var.vtc index 67786ae049..82961e1007 100644 --- a/reg-tests/sample_fetches/cond_set_var.vtc +++ b/reg-tests/sample_fetches/cond_set_var.vtc @@ -269,7 +269,7 @@ haproxy h1 -conf { backend converter_be server s1 ${s1_addr}:${s1_port} - http-request deny if { req.len,set-var(proc.req_len,ifexists) -m int 0 } + http-request deny if { req.hdrs,length,set-var(proc.req_len,ifexists) -m int 0 } http-request deny if { req.hdr("X-Cust"),set-var(sess.x_cust,ifnotempty,ifnotset),length -m int 0 } http-response set-header x-var "proc.req_len=%[var(proc.req_len)] sess.x_cust=%[var(sess.x_cust)]" @@ -358,5 +358,5 @@ client c10 -connect ${h1_mainfe_sock} { txreq -url "/converter" -hdr "X-Cust: foobar" rxresp expect resp.status == 200 - expect resp.http.x-var == "proc.req_len=67 sess.x_cust=foobar" + expect resp.http.x-var == "proc.req_len=35 sess.x_cust=foobar" } -run