>> and 2. how >> could we write a new function in HAProxy which takes a buffer of data in >> entry and can return a string (or buffer of data) > > I think that what you want to implement is a sample fetch function. For > example, take a look at the recently introduced "req.hdr_names" function, > which iterates over all request headers and produces a string that can be > used to build a log line, another header or whatever. I think it will be > straightforward enough for you to understand how to implement this with > your lib. > > Best regards, > Willy >
Hi Willy, I think a converter is more suited here. I mean, a fetch can't take a buffer issued from the result of an other fetch... The idea would to configure it something like http-request set-header Foobar req.hdr(HEADER),mikefunction(<parameters if required>) Mike, in such case, you want to have a look at this file: http://git.haproxy.org/?p=haproxy.git;a=blob_plain;f=src/sample.c;hb=HEAD and with the upper and lower and any other converter functions. Baptiste