mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-16 08:24:42 +00:00
[MINOR] set s->srv_error according to the analysers
s->srv_error was set depending on the frontend's protocol. Now it is set by the HTTP analyser, so that even when switching from a TCP frontend to an HTTP backend, we can have HTTP error messages.
This commit is contained in:
parent
c1a2167e9d
commit
52a0c60845
@ -231,10 +231,8 @@ int event_accept(int fd) {
|
||||
else
|
||||
s->do_log = tcp_sess_log;
|
||||
|
||||
if (p->mode == PR_MODE_HTTP)
|
||||
s->srv_error = http_return_srv_error;
|
||||
else
|
||||
s->srv_error = default_srv_error;
|
||||
/* default error reporting function, may be changed by analysers */
|
||||
s->srv_error = default_srv_error;
|
||||
|
||||
s->logs.accept_date = date; /* user-visible date for logging */
|
||||
s->logs.tv_accept = now; /* corrected date for internal use */
|
||||
|
@ -1789,6 +1789,9 @@ int http_wait_for_request(struct session *s, struct buffer *req, int an_bit)
|
||||
req->l,
|
||||
req->analysers);
|
||||
|
||||
/* we're speaking HTTP here, so let's speak HTTP to the client */
|
||||
s->srv_error = http_return_srv_error;
|
||||
|
||||
if (likely(req->lr < req->r))
|
||||
http_msg_analyzer(req, msg, &txn->hdr_idx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user