comparison h2_trailers.t @ 1646:5b1fa6e32549

Tests: avoid http2_max_field_size in h2_trailers.t. URI used to pass a large parameter is adjusted to fit the default limit.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 08 Feb 2021 19:47:51 +0300
parents 97c8280de681
children 236d038dc04a
comparison
equal deleted inserted replaced
1645:0190dd24d328 1646:5b1fa6e32549
41 server_name localhost; 41 server_name localhost;
42 42
43 location / { 43 location / {
44 add_trailer X-Var $host; 44 add_trailer X-Var $host;
45 } 45 }
46
47 http2_max_field_size 256k;
48 46
49 location /continuation { 47 location /continuation {
50 # many trailers to send in parts 48 # many trailers to send in parts
51 add_trailer X-LongHeader $arg_h; 49 add_trailer X-LongHeader $arg_h;
52 add_trailer X-LongHeader $arg_h; 50 add_trailer X-LongHeader $arg_h;
106 is($frame->{flags}, 5, 'no data - trailer flags'); 104 is($frame->{flags}, 5, 'no data - trailer flags');
107 105
108 # CONTINUATION in response trailers 106 # CONTINUATION in response trailers
109 107
110 $s = Test::Nginx::HTTP2->new(); 108 $s = Test::Nginx::HTTP2->new();
111 $sid = $s->new_stream({ path => '/continuation?h=' . 'x' x 2**12 }); 109 $sid = $s->new_stream({ path => '/continuation?h=' . 'x' x 4000 });
112 $frames = $s->read(all => [{ sid => $sid, type => 'CONTINUATION' }]); 110 $frames = $s->read(all => [{ sid => $sid, type => 'CONTINUATION' }]);
113 @$frames = grep { $_->{type} =~ "HEADERS|CONTINUATION|DATA" } @$frames; 111 @$frames = grep { $_->{type} =~ "HEADERS|CONTINUATION|DATA" } @$frames;
114 112
115 is(@$frames, 4, 'continuation - frames'); 113 is(@$frames, 4, 'continuation - frames');
116 114