Mercurial > hg > nginx-tests
annotate fastcgi_body2.t @ 475:c872b2c9645f
Tests: tests for limit_conn and limit_req with complex value.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 16 Oct 2014 21:13:09 +0400 |
parents | 5a1f2e1ea6cd |
children | 907e89fba9c3 |
rev | line source |
---|---|
433
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
1 #!/usr/bin/perl |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
2 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
3 # (C) Maxim Dounin |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
4 # (C) Sergey Kandaurov |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
5 # (C) Nginx, Inc. |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
6 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
7 # Test for fastcgi backend with large request body, |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
8 # with fastcgi_next_upstream directive. |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
9 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
10 ############################################################################### |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
11 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
12 use warnings; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
13 use strict; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
14 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
15 use Test::More; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
16 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
17 BEGIN { use FindBin; chdir($FindBin::Bin); } |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
18 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
19 use lib 'lib'; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
20 use Test::Nginx; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
21 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
22 ############################################################################### |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
23 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
24 select STDERR; $| = 1; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
25 select STDOUT; $| = 1; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
26 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
27 eval { require FCGI; }; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
28 plan(skip_all => 'FCGI not installed') if $@; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
29 plan(skip_all => 'win32') if $^O eq 'MSWin32'; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
30 |
461
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
31 my $t = Test::Nginx->new()->has(qw/http fastcgi/)->plan(2) |
433
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
32 ->write_file_expand('nginx.conf', <<'EOF'); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
33 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
34 %%TEST_GLOBALS%% |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
35 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
36 daemon off; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
37 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
38 events { |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
39 } |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
40 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
41 http { |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
42 %%TEST_GLOBALS_HTTP%% |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
43 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
44 upstream u { |
461
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
45 server 127.0.0.1:8081 max_fails=0; |
433
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
46 server 127.0.0.1:8082; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
47 } |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
48 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
49 server { |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
50 listen 127.0.0.1:8080; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
51 server_name localhost; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
52 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
53 location / { |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
54 fastcgi_pass u; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
55 fastcgi_param REQUEST_URI $request_uri; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
56 fastcgi_param CONTENT_LENGTH $content_length; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
57 # fastcgi_next_upstream error timeout; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
58 fastcgi_read_timeout 1s; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
59 } |
461
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
60 |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
61 location /in_memory { |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
62 fastcgi_pass u; |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
63 fastcgi_param REQUEST_URI $request_uri; |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
64 fastcgi_param CONTENT_LENGTH $content_length; |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
65 # fastcgi_next_upstream error timeout; |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
66 fastcgi_read_timeout 1s; |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
67 client_body_buffer_size 128k; |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
68 } |
433
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
69 } |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
70 } |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
71 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
72 EOF |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
73 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
74 $t->run_daemon(\&fastcgi_daemon, 8081); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
75 $t->run_daemon(\&fastcgi_daemon, 8082); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
76 $t->run(); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
77 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
78 $t->waitforsocket('127.0.0.1:8081'); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
79 $t->waitforsocket('127.0.0.1:8082'); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
80 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
81 ############################################################################### |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
82 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
83 TODO: { |
465
5a1f2e1ea6cd
Tests: fastcgi_body2.t TODO updated.
Sergey Kandaurov <pluknet@nginx.com>
parents:
461
diff
changeset
|
84 local $TODO = 'not yet' unless $t->has_version('1.7.6'); |
433
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
85 |
461
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
86 like(http_get_length('/', 'x' x 102400), qr/X-Length: 102400/, |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
87 'body length - in file'); |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
88 |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
89 # force quick recovery, so that the next request wouldn't fail |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
90 |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
91 http_get('/'); |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
92 |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
93 like(http_get_length('/in_memory', 'x' x 102400), qr/X-Length: 102400/, |
67f41a61307c
Tests: added fastcgi test for request body in memory.
Sergey Kandaurov <pluknet@nginx.com>
parents:
433
diff
changeset
|
94 'body length - in memory'); |
433
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
95 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
96 } |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
97 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
98 ############################################################################### |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
99 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
100 sub http_get_length { |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
101 my ($url, $body) = @_; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
102 my $length = length $body; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
103 return http(<<EOF); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
104 GET $url HTTP/1.0 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
105 Host: localhost |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
106 Content-Length: $length |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
107 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
108 $body |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
109 EOF |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
110 } |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
111 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
112 ############################################################################### |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
113 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
114 sub fastcgi_daemon { |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
115 my ($port) = @_; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
116 my $socket = FCGI::OpenSocket("127.0.0.1:$port", 5); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
117 my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
118 $socket); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
119 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
120 my ($body, $len); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
121 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
122 while( $request->Accept() >= 0 ) { |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
123 read(STDIN, $body, $ENV{'CONTENT_LENGTH'}); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
124 my $len = length $body; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
125 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
126 sleep 3 if $port == 8081; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
127 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
128 print <<EOF; |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
129 Location: http://127.0.0.1:8080/redirect |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
130 Content-Type: text/html |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
131 X-Length: $len |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
132 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
133 EOF |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
134 } |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
135 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
136 FCGI::CloseSocket($socket); |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
137 } |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
138 |
4a045c74a77c
Tests: request body test with fastcgi_next_upstream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
139 ############################################################################### |