comparison h2_request_body.t @ 889:266e3b2e88f9

Tests: adjusted HTTP/2 TODOs, request body fixes committed.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 01 Apr 2016 17:30:18 +0300
parents 4ab795ab2e62
children 323ebf087121
comparison
equal deleted inserted replaced
888:4ab795ab2e62 889:266e3b2e88f9
23 select STDERR; $| = 1; 23 select STDERR; $| = 1;
24 select STDOUT; $| = 1; 24 select STDOUT; $| = 1;
25 25
26 my $t = Test::Nginx->new()->has(qw/http http_v2 proxy/)->plan(35); 26 my $t = Test::Nginx->new()->has(qw/http http_v2 proxy/)->plan(35);
27 27
28 $t->todo_alerts(); 28 $t->todo_alerts() unless $t->has_version('1.9.14');
29 29
30 $t->write_file_expand('nginx.conf', <<'EOF'); 30 $t->write_file_expand('nginx.conf', <<'EOF');
31 31
32 %%TEST_GLOBALS%% 32 %%TEST_GLOBALS%%
33 33
131 131
132 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; 132 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
133 is($frame->{headers}->{':status'}, 200, 'request body - empty'); 133 is($frame->{headers}->{':status'}, 200, 'request body - empty');
134 134
135 TODO: { 135 TODO: {
136 local $TODO = 'not yet'; 136 local $TODO = 'not yet' unless $t->has_version('1.9.14');
137 137
138 ok($frame->{headers}{'x-body-file'}, 'request body - empty body file'); 138 ok($frame->{headers}{'x-body-file'}, 'request body - empty body file');
139 139
140 } 140 }
141 141
149 149
150 # request body discarded 150 # request body discarded
151 # RST_STREAM with zero code received 151 # RST_STREAM with zero code received
152 152
153 TODO: { 153 TODO: {
154 local $TODO = 'not yet'; 154 local $TODO = 'not yet' unless $t->has_version('1.9.14');
155 155
156 $sess = new_session(); 156 $sess = new_session();
157 $sid = new_stream($sess, { body_more => 1 }); 157 $sid = new_stream($sess, { body_more => 1 });
158 $frames = h2_read($sess, all => [{ type => 'RST_STREAM' }]); 158 $frames = h2_read($sess, all => [{ type => 'RST_STREAM' }]);
159 159