On Wed, Oct 27, 2021 at 08:46:23PM +0200, Christopher Faulet wrote:
> Le 10/27/21 à 18:32, Willy Tarreau a écrit :
> > Christopher also found that the set-var() converter already mandates a
> > matching method, as the following will be rejected:
> > 
> >       ... if { int(12),set-var(txn.truc) 12 }
> > 
> > while this one will work:
> > 
> >       ... if { int(12),set-var(txn.truc) eq 12 }
> > 
> Just a little clarification. Both are rejected with an error message. "-m
> int" is required:
> 
>         ... if { int(12),set-var(txn.truc) -m int eq 12 }

Yes of course, sorry for writing idiocies.

> Emitting an error seems to be an obvious choice if var() sample is used in
> the same situations. However, this also means following ACLs will be
> rejected while it works today:
> 
>     http-request set-var(txn.foo) str("forbidden")
>     http-request deny if { var(txn.foo) "forbidden" }
> 
> With the proposed change, "-m str" will be required.

Yes, that's exactly the point.

Thanks,
Willy

Reply via email to