Mercurial > hg > nginx-tests
comparison fastcgi_cache.t @ 358:ec9f4f2e67e8
Tests: check if fastcgi body is cached.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 26 Nov 2013 18:10:22 +0400 |
parents | 6fe0459b6668 |
children | 65d2d372ee31 |
comparison
equal
deleted
inserted
replaced
357:e0c00e695cb5 | 358:ec9f4f2e67e8 |
---|---|
60 $t->run_daemon(\&fastcgi_daemon); | 60 $t->run_daemon(\&fastcgi_daemon); |
61 $t->run()->waitforsocket('127.0.0.1:8081'); | 61 $t->run()->waitforsocket('127.0.0.1:8081'); |
62 | 62 |
63 ############################################################################### | 63 ############################################################################### |
64 | 64 |
65 like(http_get('/'), qr/SEE-THIS/, 'fastcgi request'); | 65 like(http_get('/'), qr/SEE-THIS.*^1$/ms, 'fastcgi request'); |
66 like(http_get('/'), qr/SEE-THIS/, 'fastcgi request cached'); | 66 like(http_get('/'), qr/SEE-THIS.*^1$/ms, 'fastcgi request cached'); |
67 | 67 |
68 unlike(http_head('/'), qr/SEE-THIS/, 'no data in cached HEAD'); | 68 unlike(http_head('/'), qr/SEE-THIS/, 'no data in cached HEAD'); |
69 | 69 |
70 like(http_get('/stderr'), qr/SEE-THIS/, 'large stderr handled'); | 70 like(http_get('/stderr'), qr/SEE-THIS.*^2$/ms, 'large stderr handled'); |
71 like(http_get('/stderr'), qr/SEE-THIS/, 'large stderr cached'); | 71 like(http_get('/stderr'), qr/SEE-THIS.*^2$/ms, 'large stderr cached'); |
72 | 72 |
73 ############################################################################### | 73 ############################################################################### |
74 | 74 |
75 sub fastcgi_daemon { | 75 sub fastcgi_daemon { |
76 my $socket = FCGI::OpenSocket('127.0.0.1:8081', 5); | 76 my $socket = FCGI::OpenSocket('127.0.0.1:8081', 5); |