nginx/src/http/v2
Sergey Kandaurov b19bc2e0fa HTTP/2: fixed buffer management with HTTP/2 auto-detection.
As part of normal HTTP/2 processing, incomplete frames are saved in the
control state using a fixed size memcpy of NGX_HTTP_V2_STATE_BUFFER_SIZE.
For this matter, two state buffers are reserved in the HTTP/2 recv buffer.

As part of HTTP/2 auto-detection on plain TCP connections, initial data
is first read into a buffer specified by the client_header_buffer_size
directive that doesn't have state reservation.  Previously, this made it
possible to over-read the buffer as part of saving the state.

The fix is to read the available buffer size rather than a fixed size.
Although memcpy of a fixed size can produce a better optimized code,
handling of incomplete frames isn't a common execution path, so it was
sacrificed for the sake of simplicity of the fix.
2023-10-21 18:48:24 +04:00
..
ngx_http_v2.c HTTP/2: fixed buffer management with HTTP/2 auto-detection. 2023-10-21 18:48:24 +04:00
ngx_http_v2.h HTTP/2: per-iteration stream handling limit. 2023-10-10 15:13:39 +03:00
ngx_http_v2_encode.c Moved Huffman coding out of HTTP/2. 2021-12-21 07:54:16 +03:00
ngx_http_v2_filter_module.c HTTP/2: removed server push (ticket #2432). 2023-06-08 16:56:46 +04:00
ngx_http_v2_module.c HTTP/2: fixed buffer management with HTTP/2 auto-detection. 2023-10-21 18:48:24 +04:00
ngx_http_v2_module.h HTTP/2: removed server push (ticket #2432). 2023-06-08 16:56:46 +04:00
ngx_http_v2_table.c HTTP/2: externalized various constants and interfaces. 2018-03-17 23:04:20 +03:00