Mercurial > hg > nginx-tests
changeset 859:63babcdd08db
Tests: HTTP/2 test with empty request body to ssl backend.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 26 Feb 2016 17:29:01 +0300 |
parents | 75494fb00452 |
children | cba4b1bccfd1 |
files | h2.t |
diffstat | 1 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/h2.t Wed Feb 24 17:07:51 2016 +0300 +++ b/h2.t Fri Feb 26 17:29:01 2016 +0300 @@ -32,7 +32,7 @@ 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 @@ 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 @@ 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 @@ } +# 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();