mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-01 09:42:02 +00:00
BUG/MINOR: mux-h1: Capture ignored parsing errors
When the option "accept-invalid-http-request" is enabled, some parsing errors are ignored. But the position of the error is reported. In legacy HTTP mode, such errors were captured. So, we now do the same in the H1 multiplexer. If required, this patch may be backported to 2.0 and 1.9.
This commit is contained in:
parent
53a899b946
commit
486498c630
@ -1191,6 +1191,15 @@ static size_t h1_process_headers(struct h1s *h1s, struct h1m *h1m, struct htx *h
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (h1m->err_pos >= 0) {
|
||||
/* Maybe we found an error during the parsing while we were
|
||||
* configured not to block on that, so we have to capture it
|
||||
* now.
|
||||
*/
|
||||
TRACE_STATE("Ignored parsing error", H1_EV_RX_DATA|H1_EV_RX_HDRS, h1s->h1c->conn, h1s);
|
||||
h1_capture_bad_message(h1s->h1c, h1s, h1m, buf);
|
||||
}
|
||||
|
||||
if (!(h1m->flags & H1_MF_RESP)) {
|
||||
h1s->meth = h1sl.rq.meth;
|
||||
if (h1m->state == H1_MSG_TUNNEL) {
|
||||
|
Loading…
Reference in New Issue
Block a user