mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-02 07:48:05 +00:00
MINOR: http: Add new "early-hint" http-request action.
This patch adds the new "early-hint" action to "http-request" rules parser. This action should be parsed the same way as "(add|set)-header" actions.
This commit is contained in:
parent
42d9e5ae68
commit
a985e3875b
@ -77,6 +77,7 @@ enum act_name {
|
|||||||
ACT_HTTP_DEL_ACL,
|
ACT_HTTP_DEL_ACL,
|
||||||
ACT_HTTP_DEL_MAP,
|
ACT_HTTP_DEL_MAP,
|
||||||
ACT_HTTP_SET_MAP,
|
ACT_HTTP_SET_MAP,
|
||||||
|
ACT_HTTP_EARLY_HINT,
|
||||||
|
|
||||||
/* http request actions. */
|
/* http request actions. */
|
||||||
ACT_HTTP_REQ_TARPIT,
|
ACT_HTTP_REQ_TARPIT,
|
||||||
|
@ -208,8 +208,10 @@ struct act_rule *parse_http_req_cond(const char **args, const char *file, int li
|
|||||||
else if ((rule->arg.loglevel = get_log_level(args[cur_arg]) + 1) == 0)
|
else if ((rule->arg.loglevel = get_log_level(args[cur_arg]) + 1) == 0)
|
||||||
goto bad_log_level;
|
goto bad_log_level;
|
||||||
cur_arg++;
|
cur_arg++;
|
||||||
} else if (strcmp(args[0], "add-header") == 0 || strcmp(args[0], "set-header") == 0) {
|
} else if (strcmp(args[0], "add-header") == 0 || strcmp(args[0], "set-header") == 0 ||
|
||||||
rule->action = *args[0] == 'a' ? ACT_HTTP_ADD_HDR : ACT_HTTP_SET_HDR;
|
strcmp(args[0], "early-hint") == 0) {
|
||||||
|
rule->action = *args[0] == 'a' ? ACT_HTTP_ADD_HDR :
|
||||||
|
*args[0] == 's' ? ACT_HTTP_SET_HDR : ACT_HTTP_EARLY_HINT;
|
||||||
cur_arg = 1;
|
cur_arg = 1;
|
||||||
|
|
||||||
if (!*args[cur_arg] || !*args[cur_arg+1] ||
|
if (!*args[cur_arg] || !*args[cur_arg+1] ||
|
||||||
|
Loading…
Reference in New Issue
Block a user