mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 07:11:20 +02:00
MEDIUM: h2: properly continue to parse header block when facing a 1xx response
We still didn't handle the 1xx responses properly.
This commit is contained in:
parent
9d89ac8f42
commit
c199faf5bd
@ -1949,6 +1949,7 @@ static int h2s_frt_make_resp_headers(struct h2s *h2s, struct buffer *buf)
|
|||||||
* block does not wrap and we can safely read it this way without
|
* block does not wrap and we can safely read it this way without
|
||||||
* having to realign the buffer.
|
* having to realign the buffer.
|
||||||
*/
|
*/
|
||||||
|
next_header_block:
|
||||||
ret = h1_headers_to_hdr_list(bo_ptr(buf), bo_ptr(buf) + buf->o,
|
ret = h1_headers_to_hdr_list(bo_ptr(buf), bo_ptr(buf) + buf->o,
|
||||||
list, sizeof(list)/sizeof(list[0]), h1m);
|
list, sizeof(list)/sizeof(list[0]), h1m);
|
||||||
if (ret <= 0) {
|
if (ret <= 0) {
|
||||||
@ -2067,6 +2068,12 @@ static int h2s_frt_make_resp_headers(struct h2s *h2s, struct buffer *buf)
|
|||||||
else
|
else
|
||||||
h2s->st = H2_SS_CLOSED;
|
h2s->st = H2_SS_CLOSED;
|
||||||
}
|
}
|
||||||
|
else if (h1m->status >= 100 && h1m->status < 200) {
|
||||||
|
h1m->state = HTTP_MSG_RPBEFORE;
|
||||||
|
h1m->status = 0;
|
||||||
|
h1m->flags = 0;
|
||||||
|
goto next_header_block;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
h1m->state = (h1m->flags & H1_MF_CLEN) ? HTTP_MSG_BODY : HTTP_MSG_CHUNK_SIZE;
|
h1m->state = (h1m->flags & H1_MF_CLEN) ? HTTP_MSG_BODY : HTTP_MSG_CHUNK_SIZE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user