return ACT_RET_ERR;
}
if (s->hlua->flags & HLUA_STOP)
- return ACT_RET_STOP;
+ return ACT_RET_DONE;
return ACT_RET_CONT;
/* yield. */
* alternative to the silent-drop action to defend against DoS attacks, and may
* 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
- * flags will indicate "PR". It always returns ACT_RET_STOP.
+ * flags will indicate "PR". It always returns ACT_RET_DONE.
*/
static enum act_return http_action_reject(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
if (!(s->flags & SF_FINST_MASK))
s->flags |= SF_FINST_R;
- return ACT_RET_STOP;
+ return ACT_RET_DONE;
}
/* parse the "reject" action:
case ACT_RET_CONT:
break;
case ACT_RET_STOP:
+ rule_ret = HTTP_RULE_RES_STOP;
+ goto end;
+ case ACT_RET_DONE:
rule_ret = HTTP_RULE_RES_DONE;
goto end;
case ACT_RET_YIELD:
case ACT_RET_STOP:
rule_ret = HTTP_RULE_RES_STOP;
goto end;
+ case ACT_RET_DONE:
+ rule_ret = HTTP_RULE_RES_DONE;
+ goto end;
case ACT_RET_YIELD:
s->current_rule = rule;
rule_ret = HTTP_RULE_RES_YIELD;
* by a possible reqrep, while they are processed *after* so that a
* reqdeny can still block them. This clearly needs to change in 1.6!
*/
- if (stats_check_uri(&s->si[1], txn, px)) {
+ if (!s->target && stats_check_uri(&s->si[1], txn, px)) {
s->target = &http_stats_applet.obj_type;
if (unlikely(!si_register_handler(&s->si[1], objt_applet(s->target)))) {
txn->status = 500;
* by a possible reqrep, while they are processed *after* so that a
* reqdeny can still block them. This clearly needs to change in 1.6!
*/
- if (htx_stats_check_uri(s, txn, px)) {
+ if (!s->target && htx_stats_check_uri(s, txn, px)) {
s->target = &http_stats_applet.obj_type;
if (unlikely(!si_register_handler(&s->si[1], objt_applet(s->target)))) {
txn->status = 500;
case ACT_RET_CONT:
break;
case ACT_RET_STOP:
+ rule_ret = HTTP_RULE_RES_STOP;
+ goto end;
+ case ACT_RET_DONE:
rule_ret = HTTP_RULE_RES_DONE;
goto end;
case ACT_RET_YIELD:
case ACT_RET_STOP:
rule_ret = HTTP_RULE_RES_STOP;
goto end;
+ case ACT_RET_DONE:
+ rule_ret = HTTP_RULE_RES_DONE;
+ goto end;
case ACT_RET_YIELD:
s->current_rule = rule;
rule_ret = HTTP_RULE_RES_YIELD;