/
078-hup-vars.t
58 lines (45 loc) · 969 Bytes
/
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
# vim:set ft= ts=4 sw=4 et fdm=marker:
BEGIN {
$ENV{TEST_NGINX_USE_HUP} = 1;
}
use lib 'lib';
use Test::Nginx::Socket;
#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]