The official NGINX Open Source repository.
Go to file
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
auto SSL: avoid using OpenSSL config in build directory (ticket #2404). 2023-06-21 01:29:53 +03:00
conf MIME: added image/avif type. 2021-10-25 20:49:15 +03:00
contrib Contrib: vim syntax, update core and 3rd party module directives. 2023-07-24 18:04:41 +03:00
docs nginx-1.25.2-RELEASE 2023-08-15 20:03:04 +03:00
misc Updated OpenSSL used for win32 builds. 2023-08-15 18:10:50 +03:00
src HTTP/2: fixed buffer management with HTTP/2 auto-detection. 2023-10-21 18:48:24 +04:00
.hgtags release-1.25.2 tag 2023-08-15 20:03:04 +03:00