Skip to content

Commit 3339c0a

Browse files
committed
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.
1 parent 728fba0 commit 3339c0a

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

h2_proxy_cache.t

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use Test::Nginx::HTTP2;
2323
select STDERR; $| = 1;
2424
select STDOUT; $| = 1;
2525

26-
my $t = Test::Nginx->new()->has(qw/http http_v2 proxy cache/)->plan(12)
26+
my $t = Test::Nginx->new()->has(qw/http http_v2 proxy cache/)->plan(9)
2727
->write_file_expand('nginx.conf', <<'EOF');
2828
2929
%%TEST_GLOBALS%%
@@ -130,22 +130,6 @@ $frames = $s->read(all => [{ sid => $sid, fin => 1 }], wait => 0.2);
130130
push @$frames, $_ for @{$s->read(all => [{ sid => $sid }], wait => 0.2)};
131131
ok(!grep ({ $_->{type} eq "DATA" } @$frames), 'proxy cache HEAD - no body');
132132

133-
# proxy cache - expect no stray empty DATA frame
134-
135-
TODO: {
136-
local $TODO = 'not yet';
137-
138-
$s = Test::Nginx::HTTP2->new();
139-
$sid = $s->new_stream({ path => '/cache/t.html?2' });
140-
141-
$frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
142-
my @data = grep ({ $_->{type} eq "DATA" } @$frames);
143-
is(@data, 1, 'proxy cache write - data frames');
144-
is(join(' ', map { $_->{data} } @data), 'SEE-THIS', 'proxy cache write - data');
145-
is(join(' ', map { $_->{flags} } @data), '1', 'proxy cache write - flags');
146-
147-
}
148-
149133
# HEAD on empty cache with proxy_buffering off
150134

151135
$s = Test::Nginx::HTTP2->new();

0 commit comments

Comments
 (0)