Mercurial > hg > nginx-tests
diff http_keepalive.t @ 1668:0c1bd4c23c95
Tests: $connection_requests and $connection_time tests.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 08 Apr 2021 14:51:04 +0300 |
parents | bdebd63dbab3 |
children | 489484af31eb |
line wrap: on
line diff
--- a/http_keepalive.t +++ b/http_keepalive.t @@ -49,6 +49,8 @@ http { keepalive_requests 2; keepalive_timeout 1 9; + add_header X-Conn $connection_requests:$connection_time; + location / { } location /r { keepalive_requests 4; @@ -83,7 +85,7 @@ EOF $t->write_file('safari', ''); $t->write_file('none', ''); $t->write_file('zero', ''); -$t->try_run('no keepalive_time')->plan(20); +$t->try_run('no keepalive_time')->plan(21); ############################################################################### @@ -127,6 +129,8 @@ unlike($r, qr/Connection: close/, 'keepa is(() = $r =~ /(200 OK)/g, 2, 'keepalive time limit requests'); like($r, qr/Connection: close/, 'keepalive time limit connection'); +like($r, qr/X-Conn: 1:0.*X-Conn: 2:[^0]/s, 'keepalive time limit variables'); + # cancel keepalive on EOF while discarding body my $s = http(<<EOF, start => 1);