# HG changeset patch # User Sergey Kandaurov # Date 1554825173 -10800 # Node ID fe886814b25a5842f4ee3844ac68e3bafbfd8458 # Parent 7959e58429d0ecd0d4493007d1188609f7fbddfc Tests: removed HTTP/2 proxy cache TODO tests for empty DATA frame. RFC7540 doesn't forbid sending of an empty DATA frame at the end of a stream. diff --git a/h2_proxy_cache.t b/h2_proxy_cache.t --- a/h2_proxy_cache.t +++ b/h2_proxy_cache.t @@ -23,7 +23,7 @@ use Test::Nginx::HTTP2; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http http_v2 proxy cache/)->plan(12) +my $t = Test::Nginx->new()->has(qw/http http_v2 proxy cache/)->plan(9) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -130,22 +130,6 @@ ok($frame, 'proxy cache - request body - push @$frames, $_ for @{$s->read(all => [{ sid => $sid }], wait => 0.2)}; ok(!grep ({ $_->{type} eq "DATA" } @$frames), 'proxy cache HEAD - no body'); -# proxy cache - expect no stray empty DATA frame - -TODO: { -local $TODO = 'not yet'; - -$s = Test::Nginx::HTTP2->new(); -$sid = $s->new_stream({ path => '/cache/t.html?2' }); - -$frames = $s->read(all => [{ sid => $sid, fin => 1 }]); -my @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 $s = Test::Nginx::HTTP2->new();