Mercurial > hg > nginx-tests
diff ssl.t @ 1552:3b6b2667ece9
Tests: added https test with pipelined requests.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 28 Feb 2020 18:20:33 +0300 |
parents | c6f27bcdd9d9 |
children | 2f00ed2e0d1a |
line wrap: on
line diff
--- a/ssl.t Thu Feb 27 19:49:54 2020 +0300 +++ b/ssl.t Fri Feb 28 18:20:33 2020 +0300 @@ -31,7 +31,7 @@ plan(skip_all => 'IO::Socket::SSL too old') if $@; my $t = Test::Nginx->new()->has(qw/http http_ssl rewrite proxy/) - ->has_daemon('openssl')->plan(23); + ->has_daemon('openssl')->plan(24); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -59,6 +59,8 @@ ssl_session_cache shared:SSL:1m; ssl_verify_client optional_no_ca; + keepalive_requests 1000; + location / { return 200 "body $ssl_session_reused"; } @@ -282,6 +284,20 @@ like(get_body('/body', '0123456789', 20, 5), qr/X-Body: (0123456789){100}/, 'request body chunked'); +# pipelined requests + +$s = get_ssl_socket(8085); +my $req = <<EOF; +GET / HTTP/1.1 +Host: localhost + +EOF + +$req x= 1000; + +my $r = http($req, socket => $s) || ""; +is(() = $r =~ /(200 OK)/g, 1000, 'pipelined requests'); + ############################################################################### sub get {