details:   http://freenginx.org/hg/nginx-tests/rev/70302d2090ad
branches:  
changeset: 1958:70302d2090ad
user:      Maxim Dounin <mdou...@mdounin.ru>
date:      Sat Apr 27 18:55:08 2024 +0300
description:
Tests: fixed HTTP/3 stream offset adjustment when sending body.

Previously, size of the body without the DATA frame header was used,
resulting in incorrect offset being used in further QUIC frames, making it
impossible to send the request body in multiple DATA frames.

diffstat:

 lib/Test/Nginx/HTTP3.pm |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

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
@@ -470,7 +470,7 @@ sub h3_body {
        my $buf = pack_body($self, $body) if defined $body;
        my $offset = $self->{streams}{$sid}{sent};
 
-       $self->{streams}{$sid}{sent} += length($body);
+       $self->{streams}{$sid}{sent} += length($buf);
        $self->raw_write($self->build_stream($buf,
                start => $extra->{body_more}, sid => $sid, offset => $offset));
 }
-- 
nginx-devel mailing list
nginx-devel@freenginx.org
https://freenginx.org/mailman/listinfo/nginx-devel

Reply via email to