Mercurial > hg > nginx-tests
changeset 1927:55e0dee863e2
Tests: handled receiving QUIC STREAM FIN in a separate packet.
Since a STREAM frame with the FIN bit set doesn't carry payload
(as sent by nginx), empty DATA frame is emulated.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 16 Aug 2023 16:32:12 +0400 |
parents | 0fb9ca9046bf |
children | 2df7d700518f |
files | lib/Test/Nginx/HTTP3.pm |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/Test/Nginx/HTTP3.pm Mon Aug 14 17:10:19 2023 +0400 +++ b/lib/Test/Nginx/HTTP3.pm Wed Aug 16 16:32:12 2023 +0400 @@ -514,6 +514,18 @@ goto frames; } + if (!length($buf) && $eof) { + # emulate empty DATA frame + $length = 0; + $frame->{length} = $length; + $frame->{type} = 'DATA'; + $frame->{data} = ''; + $frame->{flags} = $eof; + $frame->{sid} = $stream; + $frame->{uni} = $uni if defined $uni; + goto push_me; + } + if (length($self->{frames_incomplete}[$stream]{buf})) { $buf = $self->{frames_incomplete}[$stream]{buf} . $buf; }