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

