mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-11 05:48:41 +00:00
[MEDIUM] set rep->analysers from fe and be analysers
sess_establish() used to resort to protocol-specific guesses in order to set rep->analysers. This is no longer needed as it gets set from the frontend and the backend as a copy of what was defined in the configuration.
This commit is contained in:
parent
52a0c60845
commit
4e5b8287a6
@ -151,6 +151,7 @@ struct proxy {
|
||||
int options; /* PR_O_REDISP, PR_O_TRANSP, ... */
|
||||
int options2; /* PR_O2_* */
|
||||
unsigned int fe_req_ana, be_req_ana; /* bitmap of common request protocol analysers for the frontend and backend */
|
||||
unsigned int fe_rsp_ana, be_rsp_ana; /* bitmap of common response protocol analysers for the frontend and backend */
|
||||
int mode; /* mode = PR_MODE_TCP, PR_MODE_HTTP or PR_MODE_HEALTH */
|
||||
struct sockaddr_in dispatch_addr; /* the default address to connect to */
|
||||
union {
|
||||
|
@ -4144,16 +4144,20 @@ int check_config_validity()
|
||||
!LIST_ISEMPTY(&curproxy->tcp_req.inspect_rules))
|
||||
curproxy->fe_req_ana |= AN_REQ_INSPECT;
|
||||
|
||||
if (curproxy->mode == PR_MODE_HTTP)
|
||||
if (curproxy->mode == PR_MODE_HTTP) {
|
||||
curproxy->fe_req_ana |= AN_REQ_WAIT_HTTP | AN_REQ_HTTP_PROCESS_FE;
|
||||
curproxy->fe_rsp_ana |= AN_RTR_HTTP_HDR;
|
||||
}
|
||||
|
||||
/* both TCP and HTTP must check switching rules */
|
||||
curproxy->fe_req_ana |= AN_REQ_SWITCHING_RULES;
|
||||
}
|
||||
|
||||
if (curproxy->cap & PR_CAP_BE) {
|
||||
if (curproxy->mode == PR_MODE_HTTP)
|
||||
if (curproxy->mode == PR_MODE_HTTP) {
|
||||
curproxy->be_req_ana |= AN_REQ_WAIT_HTTP | AN_REQ_HTTP_INNER | AN_REQ_HTTP_PROCESS_BE;
|
||||
curproxy->be_rsp_ana |= AN_RTR_HTTP_HDR;
|
||||
}
|
||||
|
||||
/* If the backend does requires RDP cookie persistence, we have to
|
||||
* enable the corresponding analyser.
|
||||
|
@ -330,7 +330,6 @@ void sess_establish(struct session *s, struct stream_interface *si)
|
||||
}
|
||||
}
|
||||
else {
|
||||
rep->analysers |= AN_RTR_HTTP_HDR;
|
||||
buffer_set_rlim(rep, BUFSIZE - MAXREWRITE); /* rewrite needed */
|
||||
s->txn.rsp.msg_state = HTTP_MSG_RPBEFORE;
|
||||
/* reset hdr_idx which was already initialized by the request.
|
||||
@ -339,6 +338,7 @@ void sess_establish(struct session *s, struct stream_interface *si)
|
||||
*/
|
||||
}
|
||||
|
||||
rep->analysers |= s->fe->fe_rsp_ana | s->be->be_rsp_ana;
|
||||
rep->flags |= BF_READ_ATTACHED; /* producer is now attached */
|
||||
req->wex = TICK_ETERNITY;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user