Mercurial > hg > nginx-tests
comparison fastcgi_merge_params2.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 |
---|---|
44 fastcgi_cache_key stub; | 44 fastcgi_cache_key stub; |
45 | 45 |
46 # no fastcgi_param at all, cache switched on at server level | 46 # no fastcgi_param at all, cache switched on at server level |
47 | 47 |
48 server { | 48 server { |
49 listen 127.0.0.1:%%PORT_0%%; | 49 listen 127.0.0.1:8080; |
50 server_name localhost; | 50 server_name localhost; |
51 | 51 |
52 fastcgi_cache NAME; | 52 fastcgi_cache NAME; |
53 | 53 |
54 location / { | 54 location / { |
55 fastcgi_pass 127.0.0.1:%%PORT_1%%; | 55 fastcgi_pass 127.0.0.1:8081; |
56 } | 56 } |
57 | 57 |
58 location /no/ { | 58 location /no/ { |
59 fastcgi_pass 127.0.0.1:%%PORT_1%%; | 59 fastcgi_pass 127.0.0.1:8081; |
60 fastcgi_cache off; | 60 fastcgi_cache off; |
61 } | 61 } |
62 } | 62 } |
63 } | 63 } |
64 | 64 |
65 EOF | 65 EOF |
66 | 66 |
67 $t->run_daemon(\&fastcgi_daemon); | 67 $t->run_daemon(\&fastcgi_daemon); |
68 $t->run()->waitforsocket('127.0.0.1:' . port(1)); | 68 $t->run()->waitforsocket('127.0.0.1:' . port(8081)); |
69 | 69 |
70 ############################################################################### | 70 ############################################################################### |
71 | 71 |
72 like(http_get_ims('/'), qr/ims=;/, | 72 like(http_get_ims('/'), qr/ims=;/, |
73 'if-modified-since cleared with cache'); | 73 'if-modified-since cleared with cache'); |
94 } | 94 } |
95 | 95 |
96 ############################################################################### | 96 ############################################################################### |
97 | 97 |
98 sub fastcgi_daemon { | 98 sub fastcgi_daemon { |
99 my $socket = FCGI::OpenSocket('127.0.0.1:' . port(1), 5); | 99 my $socket = FCGI::OpenSocket('127.0.0.1:' . port(8081), 5); |
100 my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, | 100 my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, |
101 $socket); | 101 $socket); |
102 | 102 |
103 my $count; | 103 my $count; |
104 while( $request->Accept() >= 0 ) { | 104 while( $request->Accept() >= 0 ) { |