MINOR: h2: make sure h1m->err_pos field is correct on chunk error

This never happens but in case it would, it's better to report the
correct offset of the error instead of a negative value.
This commit is contained in:
Willy Tarreau 2018-09-12 09:05:16 +02:00
parent ccaf233741
commit 25173a7bcc

View File

@ -3316,7 +3316,7 @@ static size_t h2s_frt_make_resp_data(struct h2s *h2s, const struct buffer *buf,
if (ret < 0) {
/* FIXME: bad contents. how to proceed here when we're in H2 ? */
h1m->err_pos = ret;
h1m->err_pos = ofs + max + ret;
h2s_error(h2s, H2_ERR_INTERNAL_ERROR);
goto end;
}
@ -3334,7 +3334,7 @@ static size_t h2s_frt_make_resp_data(struct h2s *h2s, const struct buffer *buf,
if (ret < 0) {
/* FIXME: bad contents. how to proceed here when we're in H2 ? */
h1m->err_pos = ret;
h1m->err_pos = ofs + max + ret;
h2s_error(h2s, H2_ERR_INTERNAL_ERROR);
goto end;
}