comparison h2_server_push.t @ 1289:1e00ba2882cb

Tests: removed h2_server_push.t TODO, fixed in 3d2b0b02bd3d.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 21 Feb 2018 19:39:38 +0300
parents b575be896b99
children ecbd984ffe04
comparison
equal deleted inserted replaced
1288:eee96c138c5b 1289:1e00ba2882cb
396 { name => ':path', value => '/arg?push=/gzip.html' }, 396 { name => ':path', value => '/arg?push=/gzip.html' },
397 { name => ':authority', value => 'localhost', mode => 1 }, 397 { name => ':authority', value => 'localhost', mode => 1 },
398 { name => 'accept-encoding', value => 'gzip' }]}); 398 { name => 'accept-encoding', value => 'gzip' }]});
399 $frames = $s->read(all => [{ sid => 2, fin => 1 }]); 399 $frames = $s->read(all => [{ sid => 2, fin => 1 }]);
400 400
401 TODO: {
402 local $TODO = 'not yet';
403
404 ($frame) = grep { $_->{type} eq "PUSH_PROMISE" && $_->{sid} == $sid } @$frames; 401 ($frame) = grep { $_->{type} eq "PUSH_PROMISE" && $_->{sid} == $sid } @$frames;
405 is($frame->{headers}->{'accept-encoding'}, 'gzip', 'gzip - push promise'); 402 is($frame->{headers}->{'accept-encoding'}, 'gzip', 'gzip - push promise');
406 403
407 ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == 2 } @$frames; 404 ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == 2 } @$frames;
408 is($frame->{headers}->{'content-encoding'}, 'gzip', 'gzip - headers'); 405 is($frame->{headers}->{'content-encoding'}, 'gzip', 'gzip - headers');
409 406
410 ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == 2 } @$frames; 407 ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == 2 } @$frames;
411 gunzip_like($frame->{data}, qr/^PROMISED\Z/, 'gzip - response'); 408 gunzip_like($frame->{data}, qr/^PROMISED\Z/, 'gzip - response');
412
413 }
414 409
415 ############################################################################### 410 ###############################################################################
416 411
417 sub gunzip_like { 412 sub gunzip_like {
418 my ($in, $re, $name) = @_; 413 my ($in, $re, $name) = @_;