comparison h2_auth_request.t @ 1090:9d6a0dbb889a

Tests: check headers for appropriate stream in h2_auth_request.t.
author Andrey Zelenkov <zelenkov@nginx.com>
date Wed, 07 Dec 2016 15:22:22 +0300
parents 83b7b3f8b6c5
children 766bcbb632ee
comparison
equal deleted inserted replaced
1089:eedb96f717ff 1090:9d6a0dbb889a
81 $s = Test::Nginx::HTTP2->new(); 81 $s = Test::Nginx::HTTP2->new();
82 $sid = $s->new_stream({ path => '/auth', method => 'POST', body => 'A' x 600 }); 82 $sid = $s->new_stream({ path => '/auth', method => 'POST', body => 'A' x 600 });
83 $s->new_stream({ path => '/auth', method => 'POST', body => 'B' x 600 }); 83 $s->new_stream({ path => '/auth', method => 'POST', body => 'B' x 600 });
84 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); 84 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
85 85
86 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; 86 ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid } @$frames;
87 is($frame->{headers}->{'x-body'}, 'A' x 600, 'auth request body'); 87 is($frame->{headers}->{'x-body'}, 'A' x 600, 'auth request body');
88 isnt($frame->{headers}->{'x-body-file'}, undef, 'auth request body file'); 88 isnt($frame->{headers}->{'x-body-file'}, undef, 'auth request body file');
89 89
90 } 90 }
91 91