mirror of
https://github.com/nginx/nginx.git
synced 2026-02-03 20:29:27 -05:00
HTTP/3: close stream with H3_MESSAGE_ERROR on malformed pseudo-headers
RFC 9114, Section 4.1.2. specifies Malformed requests or responses that are detected MUST be treated as a stream error of type H3_MESSAGE_ERROR.
This commit is contained in:
parent
0609736a92
commit
53efe519de
2 changed files with 3 additions and 0 deletions
|
|
@ -69,6 +69,7 @@
|
|||
#define NGX_HTTP_V3_ERR_REQUEST_REJECTED 0x10b
|
||||
#define NGX_HTTP_V3_ERR_REQUEST_CANCELLED 0x10c
|
||||
#define NGX_HTTP_V3_ERR_REQUEST_INCOMPLETE 0x10d
|
||||
#define NGX_HTTP_V3_ERR_MESSAGE_ERROR 0x10e
|
||||
#define NGX_HTTP_V3_ERR_CONNECT_ERROR 0x10f
|
||||
#define NGX_HTTP_V3_ERR_VERSION_FALLBACK 0x110
|
||||
|
||||
|
|
|
|||
|
|
@ -995,6 +995,7 @@ ngx_http_v3_init_pseudo_headers(ngx_http_request_t *r)
|
|||
|
||||
failed:
|
||||
|
||||
ngx_quic_reset_stream(r->connection, NGX_HTTP_V3_ERR_MESSAGE_ERROR);
|
||||
ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
|
@ -1103,6 +1104,7 @@ ngx_http_v3_process_request_header(ngx_http_request_t *r)
|
|||
|
||||
failed:
|
||||
|
||||
ngx_quic_reset_stream(r->connection, NGX_HTTP_V3_ERR_MESSAGE_ERROR);
|
||||
ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue