Mercurial > hg > nginx-tests
diff grpc.t @ 1715:3604ef83c1aa
Tests: added header name tests with forbidden characters.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 29 Jun 2021 12:00:07 +0300 |
parents | e3dd111410fe |
children | b27bcded6449 |
line wrap: on
line diff
--- a/grpc.t +++ b/grpc.t @@ -24,7 +24,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; my $t = Test::Nginx->new()->has(qw/http rewrite http_v2 grpc/) - ->has(qw/upstream_keepalive/)->plan(145); + ->has(qw/upstream_keepalive/)->plan(146); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -504,6 +504,17 @@ is($frame->{headers}{':status'}, 502, 'i ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; is($frame->{headers}{':status'}, 502, 'invalid header name ctl'); +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.21.1'); + +$f->{http_start}('/'); +$f->{data}('Hello'); +$frames = $f->{field_bad}(n => "n n"); +($frame) = grep { $_->{type} eq "HEADERS" } @$frames; +is($frame->{headers}{':status'}, 502, 'invalid header name space'); + +} + $f->{http_start}('/'); $f->{data}('Hello'); $frames = $f->{field_bad}(v => "v\nv");