Hi Willy,
  I updated this patch, rewrite it and fixed the err. can you check it
again?
syntax:

expect status 200
expect ! status 200

expect string ABCD
expect ! string ABCD

expect rstatus ^2
expect ! rstatus ^2

expect rstring A..D
expect ! rstring A..D

rstatus, rstring means use regex to do the http_check.
By default, it's case sensitive, if we need case insensitive, I  think
'iexpect' keyword should be added.

thanks.
finalbsd

2009/2/20 Willy Tarreau <[email protected]>

> Hi,
>
> On Fri, Feb 20, 2009 at 05:55:22PM +0800, FinalBSD wrote:
> > Hi Willy,
> >    I'm sorry, I think these two features are actullay the same,
> > so I just give you one patch.
>
> OK that does not matter much.
>
> > Maybe you should do some optimization for my code, but it's works now.
> > Now we can use:
> >
> >         option httpchk GET  /http-check.php HTTP/1.0
> >         http-check expect ! status 2..
> >         server www1 10.10.9.146:80 cookie A check port 80 inter 2000
> rise 2
> > fall 2
> >
> > or
> >         http-check expect status 2..
> >         http-check expect ! status ^2.*
> >         http-check expect status 200
> > and we also can use:
> >          http-check expect string ABCD
> >         http-check expect ! string ABCD
> >          http-check expect string ^AB.*D$
> >         http-check expect ! string ^AB.*D$
>
> It would have been preferable to distinguish between string and regex.
>
> I've quickly looked at your patch, I noticed a wrong value for the UNEXPECT
> option. The PR_O_* flags are full for ->options, you can use the new
> ->options2
> field and create new flags for this one (PR_O2_* if my memory serves me
> right).
>
> Thanks!
> Willy
>
>
>

Attachment: haproxy-ss-20090207.diff.tar.gz
Description: GNU Zip compressed data

Reply via email to