Mercurial > hg > nginx-tests
changeset 765:14d6f69b7d9d
Tests: added HTTP/2 proxy cache tests for empty DATA frame.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 28 Oct 2015 00:11:46 +0300 |
parents | 5dcd998daace |
children | a764054d457f |
files | h2.t |
diffstat | 1 files changed, 17 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/h2.t Wed Oct 28 00:11:45 2015 +0300 +++ b/h2.t Wed Oct 28 00:11:46 2015 +0300 @@ -32,7 +32,7 @@ my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2 proxy cache/) ->has(qw/limit_conn rewrite realip shmem/) - ->has_daemon('openssl')->plan(276); + ->has_daemon('openssl')->plan(279); # Some systems may have also a bug in not treating zero writev iovcnt as EINVAL @@ -1336,6 +1336,22 @@ push @$frames, $_ for @{h2_read($sess, all => [{ sid => $sid }])}; ok(!grep ({ $_->{type} eq "DATA" } @$frames), 'proxy cache HEAD - no body'); +# proxy cache - expect no stray empty DATA frame + +TODO: { +local $TODO = 'not yet'; + +$sess = new_session(); +$sid = new_stream($sess, { path => '/cache/t2.html?2' }); + +$frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); +@data = grep ({ $_->{type} eq "DATA" } @$frames); +is(@data, 1, 'proxy cache write - data frames'); +is(join(' ', map { $_->{data} } @data), 'SEE-THIS', 'proxy cache write - data'); +is(join(' ', map { $_->{flags} } @data), '1', 'proxy cache write - flags'); + +} + # HEAD on empty cache with proxy_buffering off $sess = new_session();