changeset 896:48d277065309

Tests: emit HTTP/2 SETTINGS acknowledgement by default.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 13 Apr 2016 13:03:09 +0300
parents 894e142ebdf8
children 323ebf087121
files h2.t lib/Test/Nginx/HTTP2.pm
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/h2.t
+++ b/h2.t
@@ -226,11 +226,11 @@ is($frame->{sid}, 0, 'PING stream');
 
 # timeouts
 
-push my @sess, new_session(8089);
-push @sess, new_session(8089);
+push my @sess, new_session(8089, pure => 1);
+push @sess, new_session(8089, pure => 1);
 h2_ping($sess[-1], 'SEE-THIS');
-push @sess, new_session(8090);
-push @sess, new_session(8090);
+push @sess, new_session(8090, pure => 1);
+push @sess, new_session(8090, pure => 1);
 h2_ping($sess[-1], 'SEE-THIS');
 
 select undef, undef, undef, 2.1;
--- a/lib/Test/Nginx/HTTP2.pm
+++ b/lib/Test/Nginx/HTTP2.pm
@@ -456,11 +456,17 @@ sub new_session {
 
 	# update windows, if any
 
-	h2_read($ctx, all => [
+	my $frames = h2_read($ctx, all => [
 		{ type => 'WINDOW_UPDATE' },
 		{ type => 'SETTINGS'}
 	]);
 
+	# 6.5.3.  Settings Synchronization
+
+	if (grep { $_->{type} eq "SETTINGS" && $_->{flags} == 0 } @$frames) {
+		h2_settings($ctx, 1);
+	}
+
 	return $ctx;
 }