Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2.c @ 7192:d5a535774861
HTTP/2: finalize request as bad if parsing of pseudo-headers fails.
This is in line when the required pseudo-headers are missing, and
avoids spurious zero statuses in access.log.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 30 Jan 2018 14:44:31 +0300 |
parents | 61d276dcd493 |
children | cadb43014c7c |
comparison
equal
deleted
inserted
replaced
7191:61d276dcd493 | 7192:d5a535774861 |
---|---|
1581 if (rc == NGX_ABORT) { | 1581 if (rc == NGX_ABORT) { |
1582 goto error; | 1582 goto error; |
1583 } | 1583 } |
1584 | 1584 |
1585 if (rc == NGX_DECLINED) { | 1585 if (rc == NGX_DECLINED) { |
1586 if (ngx_http_v2_terminate_stream(h2c, h2c->state.stream, | 1586 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); |
1587 NGX_HTTP_V2_PROTOCOL_ERROR) | |
1588 == NGX_ERROR) | |
1589 { | |
1590 return ngx_http_v2_connection_error(h2c, | |
1591 NGX_HTTP_V2_INTERNAL_ERROR); | |
1592 } | |
1593 | |
1594 goto error; | 1587 goto error; |
1595 } | 1588 } |
1596 | 1589 |
1597 return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR); | 1590 return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR); |
1598 } | 1591 } |