Hi,

Willy thanks for clarification about lfs_file, I've removed it from patch.
As Christopher mentioned, when developing the patch I've noticed the
comment that when "action_ptr" is set, "action" can be set to any
meaningful value. However, I also had doubts about it. :)

Christopher I fixed the parsing issue (I hope), good catch and many thanks!



sob., 21 lis 2020 o 10:43 Willy Tarreau <[email protected]> napisał(a):

> On Sat, Nov 21, 2020 at 09:42:32AM +0100, Christopher Faulet wrote:
> > ..Le 21/11/2020 à 06:15, Willy Tarreau a écrit :
> > > I looked at the patch, it's OK regarding this and most of the other
> > > stuff, except one thing, it mixes ACT_HTTP_* and PAT_MATCH_* and there
> > > is some breakage there, because the HTTP action being set to
> PAT_MATCH_STR
> > > for example sets it to value 5 which is ACT_HTTP_SET_NICE, etc. So you
> > > must only have ACT_* values in your rule->action field.
> > >
> > > Maciej, there are two possibilities here. Either you duplicate the
> delete
> > > action to have DEL_STR, DEL_BEG, DEL_SUB etc, and you just set the
> right
> > > action based on the matching method you found during parsing, or you
> > > extend act_rule.arg.http to add a matching method for the delete
> action.
> > > I tend to consider that the former is cleaner and simpler, given that
> > > we're really performing a few different actions there, which are all
> > > derivatives of the delete action.
> >
> > Hi,
> >
> > rule->action value may be set to any value if an action function is
> defined
> > (rule->action_ptr). ACT_* are only used for action without action
> function,
> > to perform a switch case on it. That's documented this way :
> >
> > unsigned int action; /* ACT_* or any meaningful value if action_ptr is
> defined */
>
> OK, I wasn't aware of this, seeing only ACT_* there. Fine by me then.
>
> Willy
>

Attachment: 0001-BUG-MINOR-http_htx-Fix-searching-headers-by-substrin.patch
Description: Binary data

Attachment: 0002-MINOR-http_act-Add-m-flag-for-del-header-name-matchi.patch
Description: Binary data

Reply via email to