[MINOR] http: take a capture of too large requests and responses

It's hard to prove a request or response is too large if there is no
capture, so let's take a snapshot of those too.
This commit is contained in:
Willy Tarreau 2011-09-02 20:04:57 +02:00
parent 509433391a
commit fec4d89b24

View File

@ -2490,6 +2490,8 @@ int http_wait_for_request(struct session *s, struct buffer *req, int an_bit)
session_inc_http_req_ctr(s);
session_inc_http_err_ctr(s);
proxy_inc_fe_req_ctr(s->fe);
if (msg->err_pos < 0)
msg->err_pos = req->l;
goto return_bad_req;
}
@ -4758,6 +4760,8 @@ int http_wait_for_response(struct session *s, struct buffer *rep, int an_bit)
/* too large response does not fit in buffer. */
else if (rep->flags & BF_FULL) {
if (msg->err_pos < 0)
msg->err_pos = rep->l;
goto hdr_response_bad;
}