Mercurial > hg > nginx-tests
comparison h2_variables.t @ 1297:a94a0fc60d56
Tests: avoid empty DATA frame in h2_variables.t.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 07 Mar 2018 19:03:37 +0300 |
parents | b50c8b9a7644 |
children | 236d038dc04a |
comparison
equal
deleted
inserted
replaced
1296:5d75938b2622 | 1297:a94a0fc60d56 |
---|---|
48 } | 48 } |
49 location /scheme { | 49 location /scheme { |
50 return 200 $scheme; | 50 return 200 $scheme; |
51 } | 51 } |
52 location /https { | 52 location /https { |
53 return 200 $https; | 53 return 200 "body $https"; |
54 } | 54 } |
55 location /rl { | 55 location /rl { |
56 return 200 $request_length; | 56 return 200 $request_length; |
57 } | 57 } |
58 } | 58 } |
96 $s = Test::Nginx::HTTP2->new(); | 96 $s = Test::Nginx::HTTP2->new(); |
97 $sid = $s->new_stream({ path => '/https' }); | 97 $sid = $s->new_stream({ path => '/https' }); |
98 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); | 98 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); |
99 | 99 |
100 ($frame) = grep { $_->{type} eq "DATA" } @$frames; | 100 ($frame) = grep { $_->{type} eq "DATA" } @$frames; |
101 is($frame->{data}, '', 'https variable'); | 101 is($frame->{data}, 'body ', 'https variable'); |
102 | 102 |
103 # $request_length, HEADERS payload length | 103 # $request_length, HEADERS payload length |
104 | 104 |
105 $s = Test::Nginx::HTTP2->new(); | 105 $s = Test::Nginx::HTTP2->new(); |
106 $sid = $s->new_stream({ headers => [ | 106 $sid = $s->new_stream({ headers => [ |