comparison js_internal_redirect.t @ 1591:a7902e5adeab

Tests: style.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 18 Sep 2020 13:36:41 +0100
parents 9521130f6f22
children bc0990ea2e5b
comparison
equal deleted inserted replaced
1590:e682d5ad3861 1591:a7902e5adeab
65 $t->write_file('test.js', <<EOF); 65 $t->write_file('test.js', <<EOF);
66 function test_njs(r) { 66 function test_njs(r) {
67 r.return(200, njs.version); 67 r.return(200, njs.version);
68 } 68 }
69 69
70 function test_redirect(req) { 70 function test_redirect(r) {
71 if (req.variables.arg_dest == 'named') { 71 if (r.variables.arg_dest == 'named') {
72 req.internalRedirect('\@named'); 72 r.internalRedirect('\@named');
73 73
74 } else { 74 } else {
75 if (req.variables.arg_a) { 75 if (r.variables.arg_a) {
76 req.internalRedirect('/redirect?b=' + req.variables.arg_a); 76 r.internalRedirect('/redirect?b=' + r.variables.arg_a);
77 77
78 } else { 78 } else {
79 req.internalRedirect('/redirect'); 79 r.internalRedirect('/redirect');
80 } 80 }
81 } 81 }
82 } 82 }
83 83
84 EOF 84 EOF