comparison h2.t @ 829:5c003c3b8e9e

Tests: style.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 27 Jan 2016 18:44:15 +0300
parents 92e20c77c916
children 3d12316e6f41
comparison
equal deleted inserted replaced
828:68d5a68eb938 829:5c003c3b8e9e
1473 $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); 1473 $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]);
1474 1474
1475 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; 1475 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
1476 is($frame->{headers}->{':status'}, '200', 'discard body - limit req - next'); 1476 is($frame->{headers}->{':status'}, '200', 'discard body - limit req - next');
1477 1477
1478 # ditto, but instead of receiving the rest of data frame, the connection is closed 1478 # ditto, but instead of receiving the rest of data frame, connection is closed
1479 # 'http request already closed while closing request' alert can be produced 1479 # 'http request already closed while closing request' alert can be produced
1480 1480
1481 TODO: { 1481 TODO: {
1482 todo_skip 'use-after-free', 1 unless $ENV{TEST_NGINX_UNSAFE}; 1482 todo_skip 'use-after-free', 1 unless $ENV{TEST_NGINX_UNSAFE};
1483 1483
1484 $sess = new_session(); 1484 $sess = new_session();
1485 $sid = new_stream($sess, { split => [61], abort => 1, path => '/limit_req', body => 'TEST' }); 1485 $sid = new_stream($sess, { path => '/limit_req', body => 'TEST', split => [61],
1486 abort => 1 });
1486 $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); 1487 $frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]);
1487 1488
1488 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; 1489 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
1489 is($frame->{headers}->{':status'}, '200', 'discard body - limit req - eof'); 1490 is($frame->{headers}->{':status'}, '200', 'discard body - limit req - eof');
1490 1491