-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy path078-hup-vars.t
64 lines (50 loc) · 1.15 KB
/
078-hup-vars.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# vim:set ft= ts=4 sw=4 et fdm=marker:
our $SkipReason;
BEGIN {
if ($ENV{TEST_NGINX_CHECK_LEAK}) {
$SkipReason = "unavailable for the hup tests";
} else {
$ENV{TEST_NGINX_USE_HUP} = 1;
undef $ENV{TEST_NGINX_USE_STAP};
}
}
use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : ();
#worker_connections(1014);
#master_on();
#workers(2);
#log_level('debug');
repeat_each(2);
plan tests => repeat_each() * (3 * blocks());
#no_diff();
#no_long_string();
no_shuffle();
run_tests();
__DATA__
=== TEST 1: nginx variable hup bug (step 1)
http://mailman.nginx.org/pipermail/nginx-devel/2012-May/002223.html
--- config
location /t {
set $vv $http_host;
set_by_lua $i 'return ngx.var.http_host';
echo $i;
}
--- request
GET /t
--- response_body
localhost
--- no_error_log
[error]
=== TEST 2: nginx variable hup bug (step 2)
http://mailman.nginx.org/pipermail/nginx-devel/2012-May/002223.html
--- config
location /t {
#set $vv $http_host;
set_by_lua $i 'return ngx.var.http_host';
echo $i;
}
--- request
GET /t
--- response_body
localhost
--- no_error_log
[error]