On Fri, Apr 22, 2016 at 11:56 PM Cyril Bonté <cyril.bo...@free.fr> wrote:

> Hi David,
>
> Le 23/04/2016 04:27, David Birdsong a écrit :
> > predefined acl's dont work w/ integer comparison either, but calculating
> > the value and doing the integer comparison directly in an ACL works fine.
> >
> > On Fri, Apr 22, 2016 at 6:31 PM David Birdsong <david.birds...@gmail.com
> > <mailto:david.birds...@gmail.com>> wrote:
> >
> >     I'm computing an integer like so:
> >     http-request set-var(txn.req_modulo) base,crc32(),mod(1000)
> >
> >     when I use the variable in an anonymous ACL to determine a backend:
> >
> >     use_backend sjc1_spillway_pool if { var(txn.req_modulo) lt 80 }
> >
> >     only requests that calculate to 80 get sent instead of less than 80.
>
> You need to specify the "int" pattern matching method, otherwise here
> you are explicitly comparing strings "lt" and "80".
>
> Can you retry with :
>     use_backend sjc1_spillway_pool if { var(txn.req_modulo) -m int lt 80 }
>
>
retried, this works. thanks.

i wasn't sure if set-var carried over any typing.


>
>
> --
> Cyril Bonté
>

Reply via email to