| 12
 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
 
 | # vi:ft=
use lib 'lib';
use Test::Nginx::Socket; # 'no_plan';
plan tests => 9;
no_diff;
run_tests();
__DATA__
=== TEST 1: vars
--- config
    location /foo {
        echo hi;
        set $val 'hello, world';
        more_set_headers 'X-Foo: $val';
    }
--- request
    GET /foo
--- response_headers
X-Foo: hello, world
--- response_body
hi
=== TEST 2: vars in both key and val
--- config
    location /foo {
        echo hi;
        set $val 'hello, world';
        more_set_headers '$val: $val';
    }
--- request
    GET /foo
--- response_headers
$val: hello, world
--- response_body
hi
=== TEST 3: vars in input header directives
--- config
    location /foo {
        set $val 'dog';
        more_set_input_headers 'Host: $val';
        echo $host;
    }
--- request
    GET /foo
--- response_body
dog
--- response_headers
Host:
 |