Mercurial > hg > nginx-tests
comparison fastcgi_header_params.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 | b7d0e595e927 |
comparison
equal
deleted
inserted
replaced
973:7d7aef8b9f3a | 974:882267679006 |
---|---|
37 | 37 |
38 http { | 38 http { |
39 %%TEST_GLOBALS_HTTP%% | 39 %%TEST_GLOBALS_HTTP%% |
40 | 40 |
41 server { | 41 server { |
42 listen 127.0.0.1:%%PORT_0%%; | 42 listen 127.0.0.1:8080; |
43 server_name localhost; | 43 server_name localhost; |
44 | 44 |
45 location / { | 45 location / { |
46 fastcgi_pass 127.0.0.1:%%PORT_1%%; | 46 fastcgi_pass 127.0.0.1:8081; |
47 fastcgi_param HTTP_X_BLAH "blah"; | 47 fastcgi_param HTTP_X_BLAH "blah"; |
48 } | 48 } |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 EOF | 52 EOF |
53 | 53 |
54 $t->run_daemon(\&fastcgi_daemon); | 54 $t->run_daemon(\&fastcgi_daemon); |
55 $t->run()->waitforsocket('127.0.0.1:' . port(1)); | 55 $t->run()->waitforsocket('127.0.0.1:' . port(8081)); |
56 | 56 |
57 ############################################################################### | 57 ############################################################################### |
58 | 58 |
59 like(http_get_headers('/'), qr/SEE-THIS/, | 59 like(http_get_headers('/'), qr/SEE-THIS/, |
60 'fastcgi request with many ignored headers'); | 60 'fastcgi request with many ignored headers'); |
90 } | 90 } |
91 | 91 |
92 ############################################################################### | 92 ############################################################################### |
93 | 93 |
94 sub fastcgi_daemon { | 94 sub fastcgi_daemon { |
95 my $socket = FCGI::OpenSocket('127.0.0.1:' . port(1), 5); | 95 my $socket = FCGI::OpenSocket('127.0.0.1:' . port(8081), 5); |
96 my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, | 96 my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, |
97 $socket); | 97 $socket); |
98 | 98 |
99 my $count; | 99 my $count; |
100 while( $request->Accept() >= 0 ) { | 100 while( $request->Accept() >= 0 ) { |