[core] consolidate duplicated read-to-close code
[lighttpd.git] / tests / var-include-sub.conf
blobd8f169697eb16b06a669bd8114ba7a4febf10114
1 # file to be included
2 $HTTP["host"] =~ "^" + server.name + "$" {
3         url.redirect = (
4                 "^/include$"       => "/good_include",
5                 "^/concat$"        => "/good_" + "concat",
6                 "^/servername1$"   => "/good_" + server.name,
7                 "^/servername2$"   => server.name + "/good_",
8                 "^/servername3$"   => "/good_" + server.name + "/",
9                 "^/var.myvar$"     => "/good_var_myvar" + var.myvar,
10                 "^/myvar$"         => "/good_myvar" + myvar,
11                 "^/number1$"       => "/good_number" + one,
12                 "^/number2$"       => one + "/good_number",
13                 "^/env$"           => "/" + env.env_test,
14         )
16         num = 1
17         num2 = 2
18         num2 += 1
20         # without var prefix
21         mystr = "string"
22         mystr += "_append"
24         # from parent
25         one += 1
27         url.redirect += (
28                 "^/array_append$"  => "/good_array_append",
29                 "^/string_append$" => "/good_" + mystr,
30                 "^/number_append$" => "/good_" + one,
31         )
33         cmd = "echo cmd_ok=456"
34         include_shell cmd
35         url.redirect += (
36                 "^/include_shell$" => "/good_include_shell_" + cmd_ok,
37         )