Mercurial > hg > nginx-tests
diff h2.t @ 702:cc2b98d028c8
Tests: fixed HTTP/2 test for CONTINUATION while in header field.
Offset values to split header block were miscalculated.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 21 Sep 2015 13:59:09 +0300 |
parents | e28787665f99 |
children | 626bc3a0fdaa |
line wrap: on
line diff
--- a/h2.t +++ b/h2.t @@ -1872,11 +1872,7 @@ sub new_stream { $input = pack("B*", '001' . ipack(5, $uri->{table_size})) . $input if defined $uri->{table_size}; - my @input; - for my $length (@$split) { - my $offset = length($input[-1]) || 0; - push @input, substr $input, $offset, $length, ""; - } + my @input = map { substr $input, 0, $_, "" } @$split; push @input, $input; # set length, attach headers, padding, priority