| # Tests for addition module with buffered data from other filters. |
| # In particular, sub filter may have a partial match buffered. |
| ############################################################################### |
| BEGIN { use FindBin; chdir($FindBin::Bin); } |
| ############################################################################### |
| my $t = Test::Nginx->new()->has(qw/http proxy sub addition/)->plan(1); |
| $t->write_file_expand('nginx.conf', <<'EOF'); |
| add_after_body /after.html; |
| proxy_pass http://127.0.0.1:8080/; |
| $t->write_file('after.html', 'after'); |
| $t->write_file('body.html', 'XXXXX'); |
| ############################################################################### |
| # if data is buffered, there should be no interleaved data in output |
| like(http_get('/proxy/body.html'), qr/^XXXXXafter$/m, 'request'); |
| ############################################################################### |