rewrites optionnal while others must be performed to continue the request
processing.
- By default, the strict rewriting mode is disabled. Its value is also reset
+ By default, the strict rewriting mode is enabled. Its value is also reset
when a ruleset evaluation ends. So, for instance, if you change the mode on
the frontend, the default mode is restored when HAProxy starts the backend
rules evaluation.
rewrites optionnal while others must be performed to continue the response
processing.
- By default, the strict rewriting mode is disabled. Its value is also reset
+ By default, the strict rewriting mode is enabled. Its value is also reset
when a ruleset evaluation ends. So, for instance, if you change the mode on
the bacnkend, the default mode is restored when HAProxy starts the frontend
rules evaluation.
}
s->current_rule_list = rules;
- /* start the ruleset evaluation in soft mode */
- txn->req.flags |= HTTP_MSGF_SOFT_RW;
+ /* start the ruleset evaluation in strict mode */
+ txn->req.flags &= ~HTTP_MSGF_SOFT_RW;
list_for_each_entry(rule, rules, list) {
/* check optional condition */
rule_ret = HTTP_RULE_RES_ERROR;
}
- /* if the ruleset evaluation is finished reset the soft mode */
+ /* if the ruleset evaluation is finished reset the strict mode */
if (rule_ret != HTTP_RULE_RES_YIELD)
- txn->req.flags |= HTTP_MSGF_SOFT_RW;
+ txn->req.flags &= ~HTTP_MSGF_SOFT_RW;
/* we reached the end of the rules, nothing to report */
return rule_ret;
}
s->current_rule_list = rules;
- /* start the ruleset evaluation in soft mode */
- txn->rsp.flags |= HTTP_MSGF_SOFT_RW;
+ /* start the ruleset evaluation in strict mode */
+ txn->rsp.flags &= ~HTTP_MSGF_SOFT_RW;
list_for_each_entry(rule, rules, list) {
/* check optional condition */
}
end:
- /* if the ruleset evaluation is finished reset the soft mode */
+ /* if the ruleset evaluation is finished reset the strict mode */
if (rule_ret != HTTP_RULE_RES_YIELD)
- txn->rsp.flags |= HTTP_MSGF_SOFT_RW;
+ txn->rsp.flags &= ~HTTP_MSGF_SOFT_RW;
/* we reached the end of the rules, nothing to report */
return rule_ret;
void http_txn_reset_req(struct http_txn *txn)
{
- txn->req.flags = HTTP_MSGF_SOFT_RW;
+ txn->req.flags = 0;
txn->req.msg_state = HTTP_MSG_RQBEFORE; /* at the very beginning of the request */
}
void http_txn_reset_res(struct http_txn *txn)
{
- txn->rsp.flags = HTTP_MSGF_SOFT_RW;
+ txn->rsp.flags = 0;
txn->rsp.msg_state = HTTP_MSG_RPBEFORE; /* at the very beginning of the response */
}