Hi Patrick,

On Thu, Oct 06, 2016 at 01:37:35PM -0400, Patrick Hemmer wrote:
> While working with the `http-request set-var` (and a few other places,
> but primarily here), it would be very useful to be able to use haproxy
> format strings to define the variable.
> 
> For example
>   http-request set-var(txn.foo) fmt(%ci:%cp:%Ts)
> Or even
>   http-request set-var(txn.foo) fmt(%ci:%cp:%Ts),crc32()
> 
> I don't currently see a way to do this, but I could be missing something.
> If it's not possible, any chance of getting it added?

I agree we're missing this. I've been willing to concatenate certain
fields without being able to do so. The only way to do it right now is
to pass via headers which is a pain. I remember contemplating this option
a few months ago and finding some technical difficulties with it, related
to the error processing during the parsing but I don't remember exactly
which ones unfortunately. Probably that should be studied again.

We also wanted to work on some converters dealing with a stack allowing
an RPN-like syntax for complex data processing. It would remain compatible
with what we currently have but offer wider possibilities and cover all
use cases supported by the fmt string in addition to some cases where the
fmt does not work (eg: binary lookups in tables). We'd then have some
strcat() or whatever converters to append the last two strings for example.
I believe that this option was also what managed to put the fmt string much
lower in the priority queue.

Unfortunately everyone willing to work on this has been lacking time and
now we have neither of them :-(

Thierry, are you still interested in working on the RPN system and more
importantly do you think you'll have enough time before the end of this
month ?

Thanks,
Willy

Reply via email to