Am 16.05.2019 um 11:16 schrieb Willy Tarreau:
> Hi Aleks,
>
> On Wed, May 15, 2019 at 09:09:08PM +0200, Aleksandar Lazic wrote:
>>> The obvious `http-request set-path %[path,regsub(...)]` as suggested in
>>> the docs for `http-request set-query` does *NOT* work, because the
>>> `regsub` parameters cannot contain the closing parenthesis required for
>>> capture groups.
>>
>>
>> Uh yes that's really unhandy.
>>
>> How about to reuse the `create_cond_regex_rule(...)` for
>>
>> http-(request|respone) replace <search> <replace> [ { if | unless
>> }<condition> ]
>> http-(request|respone) ireplace <search> <replace> [{ if | unless}
>> <condition> ]
>>
>> which uses `chain_regex(...)` or maybe it's easier to add to `regsub` a
>> backtick
>> possibility?
>
> The main issue is that the original rulesets would apply line by line
> regardless of the type of line (start line, header, etc). This is the
> reason why it was so painful to use for URL mapping, and so slow!
> Imagine that when a request comes from H2, we have to emulate them by
> recompose a fake H1 request representing approximately the same contents
> and iterate the regex on each line there. It's really ugly, extremely
> slow and unreliable. That's why I'd rather have new actions to edit the
> URI, path and whatever is needed instead.
got it, thanks for explanation.
> Cheers,
> Willy
Regards
aleks