# HG changeset patch # User Sergey Kandaurov # Date 1526897697 -10800 # Node ID ecbd984ffe04abe66bdc4a73abb5ad91fec012ef # Parent fda0bf1cc6015c5d6bb9798763d7c2b2a14f36c5 Tests: added HTTP/2 test for server push with original scheme. diff --git a/h2_server_push.t b/h2_server_push.t --- a/h2_server_push.t +++ b/h2_server_push.t @@ -134,7 +134,7 @@ EOF $t->write_file('t2', 'SEE-THIS'); $t->write_file('explf', join('', map { sprintf "X%06dXXX", $_ } (1 .. 6553))); -$t->try_run('no http2_push')->plan(41); +$t->try_run('no http2_push')->plan(42); ############################################################################### @@ -407,6 +407,24 @@ is($frame->{headers}->{'content-encoding ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == 2 } @$frames; gunzip_like($frame->{data}, qr/^PROMISED\Z/, 'gzip - response'); +# scheme https + +TODO: { +local $TODO = 'not yet'; + +$s = Test::Nginx::HTTP2->new(); +$sid = $s->new_stream({ headers => [ + { name => ':method', value => 'GET', mode => 0 }, + { name => ':scheme', value => 'https', mode => 0 }, + { name => ':path', value => '/preload' }, + { name => ':authority', value => 'localhost', mode => 1 }]}); +$frames = $s->read(all => [{ sid => 2, fin => 1 }]); + +($frame) = grep { $_->{type} eq "PUSH_PROMISE" && $_->{sid} == $sid } @$frames; +is($frame->{headers}->{':scheme'}, 'https', 'scheme https'); + +} + ############################################################################### sub gunzip_like {