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
+++ 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();