Mercurial > hg > nginx-tests
changeset 1983:c7315caf2110
Tests: optimized processing of large QUIC packets with padding.
Path MTU discovery packets might contain a lot of padding, and creating
a copy of the whole buffer for each PADDING frame, which is just one
byte with type 0, consumes lots of resources. This was seen to result
in flapping of at least h3_keepalive.t and h3_ssl_early_data.t tests.
Fix is to copy at most 8 bytes for parse_int() calls when parsing
frame types.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 03 Jun 2024 04:17:28 +0300 |
parents | fb25cbe9d4ec |
children | 81519d01f238 |
files | lib/Test/Nginx/HTTP3.pm |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/Test/Nginx/HTTP3.pm Fri May 31 06:23:00 2024 +0300 +++ b/lib/Test/Nginx/HTTP3.pm Mon Jun 03 04:17:28 2024 +0300 @@ -1361,7 +1361,7 @@ my $offset = 0; while ($offset < length($buf)) { - my ($tlen, $type) = parse_int(substr($buf, $offset)); + my ($tlen, $type) = parse_int(substr($buf, $offset, 8)); $offset += $tlen; next if $type == 0; my $frame = { type => $type };