Mercurial > hg > nginx-tests
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 Mon Apr 11 23:06:25 2016 +0300 +++ b/h2.t Wed Apr 13 13:03:09 2016 +0300 @@ -226,11 +226,11 @@ # 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 Mon Apr 11 23:06:25 2016 +0300 +++ b/lib/Test/Nginx/HTTP2.pm Wed Apr 13 13:03:09 2016 +0300 @@ -456,11 +456,17 @@ # 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; }