mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 15:04:42 +00:00
MINOR: http_act: Remove code relying on the legacy HTTP mode
Actions updating the request or the response start-line are concerned.
This commit is contained in:
parent
a209796c80
commit
12c28b6579
@ -62,8 +62,8 @@ static enum act_return http_action_set_req_line(struct act_rule *rule, struct pr
|
||||
replace->size - replace->data,
|
||||
&rule->arg.http.logfmt);
|
||||
|
||||
http_replace_req_line(rule->arg.http.action, replace->area,
|
||||
replace->data, px, s);
|
||||
htx_req_replace_stline(rule->arg.http.action, replace->area,
|
||||
replace->data, px, s);
|
||||
|
||||
ret = ACT_RET_CONT;
|
||||
|
||||
@ -148,12 +148,7 @@ static enum act_return http_action_replace_uri(struct act_rule *rule, struct pro
|
||||
output = alloc_trash_chunk();
|
||||
if (!replace || !output)
|
||||
goto leave;
|
||||
|
||||
if (IS_HTX_STRM(s))
|
||||
uri = htx_sl_req_uri(http_get_stline(htxbuf(&s->req.buf)));
|
||||
else
|
||||
uri = ist2(ci_head(&s->req) + s->txn->req.sl.rq.u, s->txn->req.sl.rq.u_l);
|
||||
|
||||
uri = htx_sl_req_uri(http_get_stline(htxbuf(&s->req.buf)));
|
||||
if (!regex_exec_match2(rule->arg.act.p[1], uri.ptr, uri.len, MAX_MATCH, pmatch, 0))
|
||||
goto leave;
|
||||
|
||||
@ -167,7 +162,7 @@ static enum act_return http_action_replace_uri(struct act_rule *rule, struct pro
|
||||
goto leave;
|
||||
|
||||
/* 3 is the set-uri action */
|
||||
http_replace_req_line(3, output->area, len, px, s);
|
||||
htx_req_replace_stline(3, output->area, len, px, s);
|
||||
|
||||
ret = ACT_RET_CONT;
|
||||
|
||||
@ -220,7 +215,7 @@ static enum act_parse_ret parse_replace_uri(const char **args, int *orig_arg, st
|
||||
static enum act_return action_http_set_status(struct act_rule *rule, struct proxy *px,
|
||||
struct session *sess, struct stream *s, int flags)
|
||||
{
|
||||
http_set_status(rule->arg.status.code, rule->arg.status.reason, s);
|
||||
htx_res_set_status(rule->arg.status.code, rule->arg.status.reason, s);
|
||||
return ACT_RET_CONT;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user