Re: A patch for haproxy 1.3.15.7 (HTTP-ECV)

From: FinalBSD <finalbsd#gmail.com>
Date: Tue, 24 Feb 2009 11:04:05 +0800


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 FinalBSD <finalbsd#gmail.com>

> good suggestion, I'll modify this patch.
>
> 2009/2/20 Willy Tarreau <w#1wt.eu>
>
> 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 <http://10.10.9.146/> 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
>>
>>
>>
>

Received on 2009/02/24 04:04

This archive was generated by hypermail 2.2.0 : 2009/02/24 05:15 CET