]> git.kaiwu.me - nginx.git/commit
HTTP/3: avoid recreation of standard client uni streams
authorRoman Arutyunyan <arut@nginx.com>
Tue, 19 May 2026 12:09:35 +0000 (16:09 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Wed, 17 Jun 2026 14:40:35 +0000 (07:40 -0700)
commit9e293766e73c469c015df5341f1c1d403fb532c6
treed89fd56294812ef608112e30febc86190256d911
parentceccdbd2ee799d020a371b9420bdacb9cf273aa7
HTTP/3: avoid recreation of standard client uni streams

Creating a control/encoder/decoder stream while another such stream
already exists, is not allowed.  Also, closing such a stream results
in connection closure with NGX_HTTP_V3_ERR_CLOSED_CRITICAL_STREAM.
However, since stream creation and connection closure are asynchronous,
there could be a window where two control/encoder/decoder streams
could coexist within a single cycle iteration.  This could result
in reusing parsing context, such as encoder insert buffer.

The change adds a mask for all standard client uni streams ever created.
This allows to check if a stream of this type was created before.
While here, mandatory stream validation now also uses this mask.
src/http/v3/ngx_http_v3.h
src/http/v3/ngx_http_v3_uni.c