# HG changeset patch # User Sergey Kandaurov # Date 1692189132 -14400 # Node ID 55e0dee863e2f9f313e6005c50db91f950b4bb32 # Parent 0fb9ca9046bf63e6d92ab40276f7b71f79569c07 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. diff --git a/lib/Test/Nginx/HTTP3.pm b/lib/Test/Nginx/HTTP3.pm --- a/lib/Test/Nginx/HTTP3.pm +++ b/lib/Test/Nginx/HTTP3.pm @@ -514,6 +514,18 @@ sub read { 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; }