Mercurial > hg > nginx-tests
annotate fastcgi_merge_params.t @ 1990:85d88cd5091c
Tests: SSI include stub tests.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 04 Jul 2024 17:42:55 +0300 |
parents | 42d9fd20eeb6 |
children |
rev | line source |
---|---|
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1 #!/usr/bin/perl |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3 # (C) Maxim Dounin |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
4 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
5 # Tests for fastcgi_param inheritance. |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
6 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
7 ############################################################################### |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
9 use warnings; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
10 use strict; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
12 use Test::More; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
13 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 BEGIN { use FindBin; chdir($FindBin::Bin); } |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
15 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 use lib 'lib'; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 use Test::Nginx; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
18 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
19 ############################################################################### |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
20 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 select STDERR; $| = 1; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 select STDOUT; $| = 1; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
23 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
24 eval { require FCGI; }; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
25 plan(skip_all => 'FCGI not installed') if $@; |
221
8d2c6358d830
Tests: avoid using FCGI on win32.
Maxim Dounin <mdounin@mdounin.ru>
parents:
188
diff
changeset
|
26 plan(skip_all => 'win32') if $^O eq 'MSWin32'; |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 |
1020
196d33c2bb45
Tests: removed TODO and try_run() checks for legacy versions.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
974
diff
changeset
|
28 my $t = Test::Nginx->new()->has(qw/http fastcgi cache/)->plan(9) |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 ->write_file_expand('nginx.conf', <<'EOF'); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
30 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
31 %%TEST_GLOBALS%% |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
32 |
249
6a0d934950bc
Tests: remove extra spaces in "daemon off".
Maxim Dounin <mdounin@mdounin.ru>
parents:
221
diff
changeset
|
33 daemon off; |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 events { |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
36 } |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
37 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 http { |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
39 %%TEST_GLOBALS_HTTP%% |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
40 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
41 fastcgi_cache_path %%TESTDIR%%/cache levels=1:2 |
503
071e8941e3bf
Tests: reduce shared memory zone sizes.
Maxim Dounin <mdounin@mdounin.ru>
parents:
459
diff
changeset
|
42 keys_zone=NAME:1m; |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
43 |
459
272925d99ad5
Tests: set cache keys to silence upcoming warnings.
Maxim Dounin <mdounin@mdounin.ru>
parents:
295
diff
changeset
|
44 fastcgi_cache_key stub; |
272925d99ad5
Tests: set cache keys to silence upcoming warnings.
Maxim Dounin <mdounin@mdounin.ru>
parents:
295
diff
changeset
|
45 |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
46 fastcgi_param HTTP_X_BLAH "blah"; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
47 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 server { |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
49 listen 127.0.0.1:8080; |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 server_name localhost; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
52 fastcgi_cache NAME; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
54 location / { |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
55 fastcgi_pass 127.0.0.1:8081; |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
56 } |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
57 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
58 location /no/ { |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
59 fastcgi_pass 127.0.0.1:8081; |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
60 fastcgi_cache off; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
61 } |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
62 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
63 location /custom/ { |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
64 fastcgi_pass 127.0.0.1:8081; |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
65 fastcgi_param HTTP_X_BLAH "custom"; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
66 } |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
67 } |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
68 } |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
69 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
70 EOF |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
71 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
72 $t->run_daemon(\&fastcgi_daemon); |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
73 $t->run()->waitforsocket('127.0.0.1:' . port(8081)); |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
74 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
75 ############################################################################### |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
76 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
77 like(http_get_ims('/'), qr/ims=;/, |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
78 'if-modified-since cleared with cache'); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
79 like(http_get_ims('/'), qr/iums=;/, |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
80 'if-unmodified-since cleared with cache'); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
81 like(http_get_ims('/'), qr/blah=blah;/, |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
82 'custom params with cache'); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
83 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 like(http_get_ims('/no/'), qr/ims=blah;/, |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
85 'if-modified-since preserved without cache'); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
86 like(http_get_ims('/no/'), qr/iums=blah;/, |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
87 'if-unmodified-since preserved without cache'); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
88 like(http_get_ims('/'), qr/blah=blah;/, |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
89 'custom params without cache'); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
90 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
91 like(http_get_ims('/custom/'), qr/ims=;/, |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
92 'if-modified-since cleared with cache custom'); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
93 like(http_get_ims('/custom/'), qr/iums=;/, |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
94 'if-unmodified-since cleared with cache custom'); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
95 like(http_get_ims('/custom/'), qr/blah=custom;/, |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
96 'custom params with cache custom'); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
97 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
98 ############################################################################### |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
99 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
100 sub http_get_ims { |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
101 my ($url) = @_; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
102 return http(<<EOF); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
103 GET $url HTTP/1.0 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
104 Host: localhost |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
105 Connection: close |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
106 If-Modified-Since: blah |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
107 If-Unmodified-Since: blah |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
108 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
109 EOF |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
110 } |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
111 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
112 ############################################################################### |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
113 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
114 sub fastcgi_daemon { |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
115 my $socket = FCGI::OpenSocket('127.0.0.1:' . port(8081), 5); |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
116 my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
117 $socket); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
118 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
119 my $count; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
120 while( $request->Accept() >= 0 ) { |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
121 $count++; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
122 |
1791
42d9fd20eeb6
Tests: avoid uninitialized warnings in fastcgi tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1020
diff
changeset
|
123 my $ims = $ENV{HTTP_IF_MODIFIED_SINCE} || ''; |
42d9fd20eeb6
Tests: avoid uninitialized warnings in fastcgi tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1020
diff
changeset
|
124 my $iums = $ENV{HTTP_IF_UNMODIFIED_SINCE} || ''; |
42d9fd20eeb6
Tests: avoid uninitialized warnings in fastcgi tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1020
diff
changeset
|
125 my $blah = $ENV{HTTP_X_BLAH} || ''; |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
126 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
127 print <<EOF; |
952
e9064d691790
Tests: converted tests to run in parallel.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
580
diff
changeset
|
128 Location: http://localhost/redirect |
182
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
129 Content-Type: text/html |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
130 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
131 ims=$ims;iums=$iums;blah=$blah; |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
132 EOF |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
133 } |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
134 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
135 FCGI::CloseSocket($socket); |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
136 } |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
137 |
23f81eb0a817
Tests: proxy_set_header/fastcgi_param/scgi_param tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
138 ############################################################################### |