changeset 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 bae890b8828d
children 62dad59cfb67
files h2.t
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
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