Changeset 1283:16f091962811 in nginx-tests


Ignore:
Timestamp:
02/13/18 10:36:37 (2 years ago)
Author:
Sergey Kandaurov <pluknet@…>
Branch:
default
Phase:
public
Message:

Tests: added h2_server_push.t test for missing ':authority'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • h2_server_push.t

    r1282 r1283  
    129129$t->write_file('explf', join('', map { sprintf "X%06dXXX", $_ } (1 .. 6553)));
    130130
    131 $t->try_run('no http2_push')->plan(37);
     131$t->try_run('no http2_push')->plan(38);
    132132
    133133###############################################################################
     
    368368is(grep({ $_->{type} eq "PUSH_PROMISE" } @$frames), 1, 'http2 max pushes 2');
    369369
     370# missing request header ':authority'
     371
     372$s = Test::Nginx::HTTP2->new(port(8082));
     373$sid = $s->new_stream({ headers => [
     374        { name => ':method', value => 'GET', mode => 0 },
     375        { name => ':scheme', value => 'http', mode => 0 },
     376        { name => ':path', value => '/', mode => 0 }]});
     377$frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
     378
     379($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
     380is($frame->{headers}->{':status'}, 400, 'incomplete headers');
     381
    370382###############################################################################
Note: See TracChangeset for help on using the changeset viewer.