"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/http_act.c" between
haproxy-2.0.13.tar.gz and haproxy-2.0.14.tar.gz

About: HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments. LTS (Long-Term Support) release.

http_act.c  (haproxy-2.0.13):http_act.c  (haproxy-2.0.14)
skipping to change at line 159 skipping to change at line 159
output = alloc_trash_chunk(); output = alloc_trash_chunk();
if (!replace || !output) if (!replace || !output)
goto leave; goto leave;
if (IS_HTX_STRM(s)) if (IS_HTX_STRM(s))
uri = htx_sl_req_uri(http_get_stline(htxbuf(&s->req.buf))); uri = htx_sl_req_uri(http_get_stline(htxbuf(&s->req.buf)));
else else
uri = ist2(ci_head(&s->req) + s->txn->req.sl.rq.u, s->txn->req.sl .rq.u_l); uri = ist2(ci_head(&s->req) + s->txn->req.sl.rq.u, s->txn->req.sl .rq.u_l);
if (rule->arg.act.p[0] == (void *)1) if (rule->arg.act.p[0] == (void *)1)
uri = http_get_path(uri); // replace path uri = iststop(http_get_path(uri), '?');
if (!regex_exec_match2(rule->arg.act.p[1], uri.ptr, uri.len, MAX_MATCH, p match, 0)) if (!regex_exec_match2(rule->arg.act.p[1], uri.ptr, uri.len, MAX_MATCH, p match, 0))
goto leave; goto leave;
replace->data = build_logline(s, replace->area, replace->size, (struct li st *)&rule->arg.act.p[2]); replace->data = build_logline(s, replace->area, replace->size, (struct li st *)&rule->arg.act.p[2]);
/* note: uri.ptr doesn't need to be zero-terminated because it will /* note: uri.ptr doesn't need to be zero-terminated because it will
* only be used to pick pmatch references. * only be used to pick pmatch references.
*/ */
len = exp_replace(output->area, output->size, uri.ptr, replace->area, pma tch); len = exp_replace(output->area, output->size, uri.ptr, replace->area, pma tch);
skipping to change at line 287 skipping to change at line 287
* also be used with HTTP/2 to close a connection instead of just a stream. * also be used with HTTP/2 to close a connection instead of just a stream.
* The txn status is unchanged, indicating no response was sent. The termination * The txn status is unchanged, indicating no response was sent. The termination
* flags will indicate "PR". It always returns ACT_RET_DONE. * flags will indicate "PR". It always returns ACT_RET_DONE.
*/ */
static enum act_return http_action_reject(struct act_rule *rule, struct proxy *p x, static enum act_return http_action_reject(struct act_rule *rule, struct proxy *p x,
struct session *sess, struct stream *s , int flags) struct session *sess, struct stream *s , int flags)
{ {
si_must_kill_conn(chn_prod(&s->req)); si_must_kill_conn(chn_prod(&s->req));
channel_abort(&s->req); channel_abort(&s->req);
channel_abort(&s->res); channel_abort(&s->res);
s->req.analysers = 0; s->req.analysers &= AN_REQ_FLT_END;
s->res.analysers = 0; s->res.analysers &= AN_RES_FLT_END;
_HA_ATOMIC_ADD(&s->be->be_counters.denied_req, 1); _HA_ATOMIC_ADD(&s->be->be_counters.denied_req, 1);
_HA_ATOMIC_ADD(&sess->fe->fe_counters.denied_req, 1); _HA_ATOMIC_ADD(&sess->fe->fe_counters.denied_req, 1);
if (sess->listener && sess->listener->counters) if (sess->listener && sess->listener->counters)
_HA_ATOMIC_ADD(&sess->listener->counters->denied_req, 1); _HA_ATOMIC_ADD(&sess->listener->counters->denied_req, 1);
if (!(s->flags & SF_ERR_MASK)) if (!(s->flags & SF_ERR_MASK))
s->flags |= SF_ERR_PRXCOND; s->flags |= SF_ERR_PRXCOND;
if (!(s->flags & SF_FINST_MASK)) if (!(s->flags & SF_FINST_MASK))
s->flags |= SF_FINST_R; s->flags |= SF_FINST_R;
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)