comparison scgi_merge_params.t @ 952:e9064d691790

Tests: converted tests to run in parallel.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 21 Jun 2016 16:39:13 +0300
parents 2cd00179f4b2
children d4a0232425ee
comparison
equal deleted inserted replaced
951:9361c7eddfc1 952:e9064d691790
44 44
45 scgi_param SCGI 1; 45 scgi_param SCGI 1;
46 scgi_param HTTP_X_BLAH "blah"; 46 scgi_param HTTP_X_BLAH "blah";
47 47
48 server { 48 server {
49 listen 127.0.0.1:8080; 49 listen 127.0.0.1:%%PORT_0%%;
50 server_name localhost; 50 server_name localhost;
51 51
52 scgi_cache NAME; 52 scgi_cache NAME;
53 53
54 location / { 54 location / {
55 scgi_pass 127.0.0.1:8081; 55 scgi_pass 127.0.0.1:%%PORT_1%%;
56 } 56 }
57 57
58 location /no/ { 58 location /no/ {
59 scgi_pass 127.0.0.1:8081; 59 scgi_pass 127.0.0.1:%%PORT_1%%;
60 scgi_cache off; 60 scgi_cache off;
61 } 61 }
62 62
63 location /custom/ { 63 location /custom/ {
64 scgi_pass 127.0.0.1:8081; 64 scgi_pass 127.0.0.1:%%PORT_1%%;
65 scgi_param SCGI 1; 65 scgi_param SCGI 1;
66 scgi_param HTTP_X_BLAH "custom"; 66 scgi_param HTTP_X_BLAH "custom";
67 } 67 }
68 } 68 }
69 } 69 }
113 ############################################################################### 113 ###############################################################################
114 114
115 sub scgi_daemon { 115 sub scgi_daemon {
116 my $server = IO::Socket::INET->new( 116 my $server = IO::Socket::INET->new(
117 Proto => 'tcp', 117 Proto => 'tcp',
118 LocalHost => '127.0.0.1:8081', 118 LocalHost => '127.0.0.1:' . port(1),
119 Listen => 5, 119 Listen => 5,
120 Reuse => 1 120 Reuse => 1
121 ) 121 )
122 or die "Can't create listening socket: $!\n"; 122 or die "Can't create listening socket: $!\n";
123 123
131 my $ims = $request->env->{HTTP_IF_MODIFIED_SINCE} || ''; 131 my $ims = $request->env->{HTTP_IF_MODIFIED_SINCE} || '';
132 my $iums = $request->env->{HTTP_IF_UNMODIFIED_SINCE} || ''; 132 my $iums = $request->env->{HTTP_IF_UNMODIFIED_SINCE} || '';
133 my $blah = $request->env->{HTTP_X_BLAH} || ''; 133 my $blah = $request->env->{HTTP_X_BLAH} || '';
134 134
135 $request->connection()->print(<<EOF); 135 $request->connection()->print(<<EOF);
136 Location: http://127.0.0.1:8080/redirect 136 Location: http://localhost/redirect
137 Content-Type: text/html 137 Content-Type: text/html
138 138
139 ims=$ims;iums=$iums;blah=$blah; 139 ims=$ims;iums=$iums;blah=$blah;
140 EOF 140 EOF
141 } 141 }