Changeset 1548:b02d0fd71638 in nginx-tests


Ignore:
Timestamp:
02/05/20 15:02:04 (13 days ago)
Author:
Sergey Kandaurov <pluknet@…>
Branch:
default
Phase:
public
Message:

Tests: added HTTP/2 test for HEADERS split on field boundary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • h2.t

    r1465 r1548  
    2727
    2828my $t = Test::Nginx->new()->has(qw/http http_v2 proxy rewrite charset gzip/)
    29         ->plan(147);
     29        ->plan(150);
    3030
    3131$t->write_file_expand('nginx.conf', <<'EOF');
     
    657657ok($frame, 'client header timeout - PING');
    658658
     659# partial request header frame received (no field split),
     660# the rest of frame is received after client header timeout
     661
     662$s = Test::Nginx::HTTP2->new(port(8087));
     663$sid = $s->new_stream({ path => '/t2.html', split => [20], split_delay => 2.1 });
     664$frames = $s->read(all => [{ type => 'RST_STREAM' }]);
     665
     666TODO: {
     667local $TODO = 'not yet' unless $t->has_version('1.17.9');
     668
     669($frame) = grep { $_->{type} eq "RST_STREAM" } @$frames;
     670ok($frame, 'client header timeout 2');
     671is($frame->{code}, 1, 'client header timeout 2 - protocol error');
     672
     673}
     674
     675$s->h2_ping('SEE-THIS');
     676$frames = $s->read(all => [{ type => 'PING' }]);
     677
     678($frame) = grep { $_->{type} eq "PING" && $_->{flags} & 0x1 } @$frames;
     679ok($frame, 'client header timeout 2 - PING');
     680
    659681# partial request body data frame received, the rest is after body timeout
    660682
Note: See TracChangeset for help on using the changeset viewer.