diff lib/Test/Nginx/HTTP2.pm @ 1218:24e175025ad8

Tests: minimal handling of HTTP/2 dynamic table size update.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 12 Sep 2017 05:34:31 +0300
parents eb813f7e0bfa
children 0f0ad7acb314
line wrap: on
line diff
--- a/lib/Test/Nginx/HTTP2.pm
+++ b/lib/Test/Nginx/HTTP2.pm
@@ -730,7 +730,7 @@ sub hunpack {
 	my $table = $ctx->{dynamic_decode};
 	my %headers;
 	my $skip = 0;
-	my ($index, $name, $value);
+	my ($index, $name, $value, $size);
 
 	my $field = sub {
 		my ($b) = @_;
@@ -782,6 +782,15 @@ sub hunpack {
 			$add->(\%headers, $name, $value);
 			next;
 		}
+
+		if (substr($ib, 0, 3) eq '001') {
+			($size, $skip) = iunpack(5, $data, $skip);
+
+			# TODO: handle dynamic table size update
+
+			next;
+		}
+
 		last;
 	}