comparison fastcgi_body.t @ 974:882267679006

Tests: simplified parallel modifications in tests. Mail tests were simplified in c227348453db.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 12 Jul 2016 17:39:03 +0300
parents e9064d691790
children 196d33c2bb45
comparison
equal deleted inserted replaced
973:7d7aef8b9f3a 974:882267679006
33 33
34 http { 34 http {
35 %%TEST_GLOBALS_HTTP%% 35 %%TEST_GLOBALS_HTTP%%
36 36
37 server { 37 server {
38 listen 127.0.0.1:%%PORT_0%%; 38 listen 127.0.0.1:8080;
39 server_name localhost; 39 server_name localhost;
40 40
41 location / { 41 location / {
42 fastcgi_pass 127.0.0.1:%%PORT_1%%; 42 fastcgi_pass 127.0.0.1:8081;
43 fastcgi_param REQUEST_URI $request_uri; 43 fastcgi_param REQUEST_URI $request_uri;
44 fastcgi_param CONTENT_LENGTH $content_length; 44 fastcgi_param CONTENT_LENGTH $content_length;
45 } 45 }
46 } 46 }
47 } 47 }
48 48
49 EOF 49 EOF
50 50
51 $t->run_daemon(\&fastcgi_daemon); 51 $t->run_daemon(\&fastcgi_daemon);
52 $t->run()->waitforsocket('127.0.0.1:' . port(1)); 52 $t->run()->waitforsocket('127.0.0.1:' . port(8081));
53 53
54 ############################################################################### 54 ###############################################################################
55 55
56 like(http_get('/'), qr/X-Body: _eos\x0d?$/ms, 'fastcgi no body'); 56 like(http_get('/'), qr/X-Body: _eos\x0d?$/ms, 'fastcgi no body');
57 57
139 } 139 }
140 140
141 sub fastcgi_daemon { 141 sub fastcgi_daemon {
142 my $server = IO::Socket::INET->new( 142 my $server = IO::Socket::INET->new(
143 Proto => 'tcp', 143 Proto => 'tcp',
144 LocalAddr => '127.0.0.1:' . port(1), 144 LocalAddr => '127.0.0.1:' . port(8081),
145 Listen => 5, 145 Listen => 5,
146 Reuse => 1 146 Reuse => 1
147 ) 147 )
148 or die "Can't create listening socket: $!\n"; 148 or die "Can't create listening socket: $!\n";
149 149