Hi,

On Mon, Mar 03, 2014 at 09:12:27PM +0100, PiBa-NL wrote:
> Hi,
> 
> Im not sure if this is the exact issue that Anup was having, and maybe 
> i'm hijacking his thread, if so i'm sorry for that, but when try to 
> check how it works i also having difficulties getting it to work as i 
> expected it to.
> 
> I'm using HAProxy v1.5dev21 on FreeBSD 8.3.
> 
> Ive written in a frontend the following which checks for a GET web 
> request to determine which backend to use, this works..:
> mode tcp
> tcp-request inspect-delay 5s
> acl PAYLOADcheck req.payload(0,3) -m bin 474554
> use_backend web_80_tcp if PAYLOADcheck
> tcp-request content accept if PAYLOADcheck
> 
> However when changing the match line to the following it fails:
> acl PAYLOADcheck req.payload(0,3) -m str GET
> or
> acl PAYLOADcheck req.payload(0,3) -m sub GET
> or
> acl PAYLOADcheck req.payload(0,3) -m reg -i GET
> 
> The req.payload returns a piece of 'binary' data, but the 'compatibility 
> matrix' seems to say that converting for use with sub/reg/others should 
> not be an issue.
> 
> Then the next step is of course to not match only the first 3 characters 
> but some content further in the 'middle' of the data stream..
> 
> Am i missing something ? Or might there be an issue with the implementation?

What you've done is absolutely correct. It is possible that there's a
bug somewhere in the cast. I'm CCing Thierry who has a pending patch
set of about 50 patches to rework ACLs (merge ACL+map and allow to update
them on-the-fly) to ensure he checks this case.

Thanks,
Willy


Reply via email to