mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-16 08:24:42 +00:00
MINOR: h2: pre-initialize h1m->err_pos to -1 on the output path
We don't want to trigger an error while parsing a response coming from haproxy (it could be an errorfile for example), so let's set this to -1.
This commit is contained in:
parent
a40704ab05
commit
9b8cd1f183
@ -691,6 +691,7 @@ static struct h2s *h2c_stream_new(struct h2c *h2c, int id)
|
||||
h2s->st = H2_SS_IDLE;
|
||||
h2s->rxbuf = BUF_NULL;
|
||||
h1m_init_res(&h2s->h1m);
|
||||
h2s->h1m.err_pos = -1; // don't care about errors on the response path
|
||||
h2s->by_id.key = h2s->id = id;
|
||||
h2c->max_id = id;
|
||||
|
||||
@ -3231,6 +3232,7 @@ static size_t h2s_frt_make_resp_headers(struct h2s *h2s, const struct buffer *bu
|
||||
else if (h1m->status >= 100 && h1m->status < 200) {
|
||||
/* we'll let the caller check if it has more headers to send */
|
||||
h1m_init_res(h1m);
|
||||
h1m->err_pos = -1; // don't care about errors on the response path
|
||||
goto end;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user