comparison h2_server_push.t @ 1535:144c6ce732e4

Tests: removed TODO and try_run() checks for legacy versions.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 02 Dec 2019 14:56:37 +0300
parents 97c8280de681
children f7170c7acf3a
comparison
equal deleted inserted replaced
1534:96fb3513345b 1535:144c6ce732e4
407 ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == 2 } @$frames; 407 ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == 2 } @$frames;
408 gunzip_like($frame->{data}, qr/^PROMISED\Z/, 'gzip - response'); 408 gunzip_like($frame->{data}, qr/^PROMISED\Z/, 'gzip - response');
409 409
410 # scheme https 410 # scheme https
411 411
412 TODO: {
413 local $TODO = 'not yet' unless $t->has_version('1.15.1');
414
415 $s = Test::Nginx::HTTP2->new(); 412 $s = Test::Nginx::HTTP2->new();
416 $sid = $s->new_stream({ headers => [ 413 $sid = $s->new_stream({ headers => [
417 { name => ':method', value => 'GET', mode => 0 }, 414 { name => ':method', value => 'GET', mode => 0 },
418 { name => ':scheme', value => 'https', mode => 0 }, 415 { name => ':scheme', value => 'https', mode => 0 },
419 { name => ':path', value => '/preload' }, 416 { name => ':path', value => '/preload' },
421 $frames = $s->read(all => [{ sid => 2, fin => 1 }]); 418 $frames = $s->read(all => [{ sid => 2, fin => 1 }]);
422 419
423 ($frame) = grep { $_->{type} eq "PUSH_PROMISE" && $_->{sid} == $sid } @$frames; 420 ($frame) = grep { $_->{type} eq "PUSH_PROMISE" && $_->{sid} == $sid } @$frames;
424 is($frame->{headers}->{':scheme'}, 'https', 'scheme https'); 421 is($frame->{headers}->{':scheme'}, 'https', 'scheme https');
425 422
426 }
427
428 ############################################################################### 423 ###############################################################################
429 424
430 sub gunzip_like { 425 sub gunzip_like {
431 my ($in, $re, $name) = @_; 426 my ($in, $re, $name) = @_;
432 427