# HG changeset patch # User Sergey Kandaurov # Date 1456496941 -10800 # Node ID 63babcdd08db1a4abc61734c0cb7c1877b9a7df9 # Parent 75494fb00452208aafb69810478bf4974cf786ac Tests: HTTP/2 test with empty request body to ssl backend. diff --git a/h2.t b/h2.t --- a/h2.t +++ b/h2.t @@ -32,7 +32,7 @@ plan(skip_all => 'IO::Socket::SSL too ol my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2 proxy cache/) ->has(qw/limit_conn rewrite realip shmem/) - ->has_daemon('openssl')->plan(316); + ->has_daemon('openssl')->plan(317); # Some systems may have also a bug in not treating zero writev iovcnt as EINVAL @@ -60,6 +60,7 @@ http { listen 127.0.0.1:8082 proxy_protocol http2; listen 127.0.0.1:8084 http2 ssl; listen 127.0.0.1:8092 http2 sndbuf=128; + listen 127.0.0.1:8094 ssl; server_name localhost; ssl_certificate_key localhost.key; @@ -150,6 +151,9 @@ http { client_body_in_file_only on; proxy_pass http://127.0.0.1:8081/; } + location /proxy_ssl/ { + proxy_pass https://127.0.0.1:8094/; + } location /limit_req { limit_req zone=req burst=2; alias %%TESTDIR%%/t2.html; @@ -1555,6 +1559,21 @@ is(read_body_file($frame->{headers}{'x-b } +# same as above but proxied to ssl backend + +TODO: { +local $TODO = 'not yet'; + +$sess = new_session(); +$sid = new_stream($sess, { path => '/proxy_ssl/', body_more => 1 }); +h2_body($sess, ''); +$frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); + +($frame) = grep { $_->{type} eq "HEADERS" } @$frames; +is($frame->{headers}->{':status'}, 200, 'request body - empty - proxy ssl'); + +} + # request body delayed in limit_req $sess = new_session();