mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-14 15:34:35 +00:00
MINOR: proto_http: replace generic opaque types by real used types in "http_capture"
This patch removes the generic opaque type for storing the configuration of the action "http_capture"".
This commit is contained in:
parent
8855a92d8c
commit
32b15003fe
@ -61,6 +61,10 @@ struct act_rule {
|
||||
struct list logfmt;
|
||||
int action;
|
||||
} http;
|
||||
struct {
|
||||
struct sample_expr *expr;
|
||||
struct cap_hdr *hdr;
|
||||
} cap;
|
||||
struct hlua_rule *hlua_rule;
|
||||
struct {
|
||||
struct sample_expr *expr;
|
||||
|
@ -12320,12 +12320,11 @@ int http_action_req_capture(struct act_rule *rule, struct proxy *px,
|
||||
struct session *sess, struct stream *s)
|
||||
{
|
||||
struct sample *key;
|
||||
struct sample_expr *expr = rule->arg.act.p[0];
|
||||
struct cap_hdr *h = rule->arg.act.p[1];
|
||||
struct cap_hdr *h = rule->arg.cap.hdr;
|
||||
char **cap = s->req_cap;
|
||||
int len;
|
||||
|
||||
key = sample_fetch_as_type(s->be, sess, s, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, expr, SMP_T_STR);
|
||||
key = sample_fetch_as_type(s->be, sess, s, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, rule->arg.cap.expr, SMP_T_STR);
|
||||
if (!key)
|
||||
return 1;
|
||||
|
||||
@ -12471,8 +12470,8 @@ int parse_http_req_capture(const char **args, int *orig_arg, struct proxy *px, s
|
||||
|
||||
rule->action = HTTP_REQ_ACT_CUSTOM_CONT;
|
||||
rule->action_ptr = http_action_req_capture;
|
||||
rule->arg.act.p[0] = expr;
|
||||
rule->arg.act.p[1] = hdr;
|
||||
rule->arg.cap.expr = expr;
|
||||
rule->arg.cap.hdr = hdr;
|
||||
}
|
||||
|
||||
else if (strcmp(args[cur_arg], "id") == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user