diff options
author | Roman Arutyunyan <arut@nginx.com> | 2020-08-24 09:56:36 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2020-08-24 09:56:36 +0300 |
commit | d294369915461ba764426c709301b6c66ed33681 (patch) | |
tree | 46e9bef435e7e40be5ca421b1c7e8a4465c304f1 /src/http/v3/ngx_http_v3_request.c | |
parent | 46173bd4b40023fd5e35bfe77b9ac2205e0c6bb0 (diff) | |
download | nginx-d294369915461ba764426c709301b6c66ed33681.tar.gz nginx-d294369915461ba764426c709301b6c66ed33681.zip |
HTTP/3: skip unknown frames on request stream.
As per HTTP/3 draft 29, section 4.1:
Frames of unknown types (Section 9), including reserved frames
(Section 7.2.8) MAY be sent on a request or push stream before,
after, or interleaved with other frames described in this section.
Also, trailers frame is now used as an indication of the request body end.
Diffstat (limited to 'src/http/v3/ngx_http_v3_request.c')
-rw-r--r-- | src/http/v3/ngx_http_v3_request.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c index fe3c79bf0..d9f4c9d55 100644 --- a/src/http/v3/ngx_http_v3_request.c +++ b/src/http/v3/ngx_http_v3_request.c @@ -418,7 +418,11 @@ ngx_http_v3_parse_request_body(ngx_http_request_t *r, ngx_buf_t *b, continue; } - /* rc == NGX_DONE */ + if (rc == NGX_DONE) { + return NGX_DONE; + } + + /* rc == NGX_OK */ ctx->size = st->length; ctx->state = sw_start; |