pipelined_requests
在同一个 TCP 连接上发送多个 HTTP 请求(流水线请求)。
语法
--- pipelined_requests eval 段接受一个 Perl 数组引用,每个元素是一个请求:
perl
1=== TEST 1: pipelined requests2--- config3 location /t {4 content_by_lua_block {5 ngx.say(ngx.var.request_uri)6 }7 }8--- pipelined_requests eval9["GET /t?a=1", "GET /t?a=2", "GET /t?a=3"]10--- response_body eval11["/t?a=1\n", "/t?a=2\n", "/t?a=3\n"]流水线请求在同一个连接上发送,可以用于测试 keep-alive 行为和连接复用。