Mercurial > hg > nginx-tests
comparison subrequest_output_buffer_size.t @ 1295:22a8982d5de6
Tests: subrequest_output_buffer_size.t adjusted.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 01 Mar 2018 20:11:53 +0300 |
parents | 192a44f590a9 |
children | 97c8280de681 |
comparison
equal
deleted
inserted
replaced
1294:192a44f590a9 | 1295:22a8982d5de6 |
---|---|
39 listen 127.0.0.1:8080; | 39 listen 127.0.0.1:8080; |
40 server_name localhost; | 40 server_name localhost; |
41 | 41 |
42 location / { | 42 location / { |
43 proxy_pass http://127.0.0.1:8081; | 43 proxy_pass http://127.0.0.1:8081; |
44 subrequest_output_buffer_size 42; | |
44 } | 45 } |
45 | 46 |
46 location /longok { | 47 location /longok { |
47 proxy_pass http://127.0.0.1:8081/long; | 48 proxy_pass http://127.0.0.1:8081/long; |
48 subrequest_output_buffer_size 42k; | |
49 } | 49 } |
50 | 50 |
51 location /ssi { | 51 location /ssi { |
52 ssi on; | 52 ssi on; |
53 } | 53 } |
66 $t->write_file('ssi.html', | 66 $t->write_file('ssi.html', |
67 '<!--#include virtual="/$arg_c" set="x" -->' . | 67 '<!--#include virtual="/$arg_c" set="x" -->' . |
68 'set: <!--#echo var="x" -->'); | 68 'set: <!--#echo var="x" -->'); |
69 | 69 |
70 $t->write_file('length', 'TEST-OK-IF-YOU-SEE-THIS'); | 70 $t->write_file('length', 'TEST-OK-IF-YOU-SEE-THIS'); |
71 $t->write_file('long', 'x' x 40000); | 71 $t->write_file('long', 'x' x 400); |
72 $t->write_file('empty', ''); | 72 $t->write_file('empty', ''); |
73 | 73 |
74 $t->try_run('no subrequest_output_buffer_size')->plan(4); | 74 $t->try_run('no subrequest_output_buffer_size')->plan(4); |
75 | 75 |
76 ############################################################################### | 76 ############################################################################### |
77 | 77 |
78 my ($r, $n); | 78 my ($r, $n); |
79 | 79 |
80 like(http_get('/ssi.html?c=length'), qr/SEE-THIS/, 'request'); | 80 like(http_get('/ssi.html?c=length'), qr/SEE-THIS/, 'request'); |
81 like(http_get('/ssi.html?c=empty'), qr/200 OK/, 'empty'); | 81 like(http_get('/ssi.html?c=empty'), qr/set: $/, 'empty'); |
82 unlike(http_get('/ssi.html?c=long'), qr/200 OK/, 'long default'); | 82 unlike(http_get('/ssi.html?c=long'), qr/200 OK/, 'long'); |
83 like(http_get('/ssi.html?c=longok'), qr/200 OK/, 'long ok'); | 83 like(http_get('/ssi.html?c=longok'), qr/x{400}/, 'long ok'); |
84 | 84 |
85 ############################################################################### | 85 ############################################################################### |