nginx/src
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
..
core Core: changed ngx_queue_sort() to use merge sort. 2023-10-18 04:30:11 +03:00
event QUIC: explicitly zero out unused keying material. 2023-10-20 18:05:07 +04:00
http HTTP/2: fixed buffer management with HTTP/2 auto-detection. 2023-10-21 18:48:24 +04:00
mail SSL: removed the "ssl" directive. 2023-06-08 14:49:27 +04:00
misc Cpp test: added stream. 2020-10-13 07:44:09 +03:00
os QUIC: path MTU discovery. 2023-08-14 09:21:27 +04:00
stream Common tree insert function for QUIC and UDP connections. 2023-05-14 12:30:11 +04:00