Mercurial > hg > nginx-tests
comparison proxy_cache_range.t @ 1214:a05ba24a462b
Tests: removed rewrite dependency in proxy_cache_range.t.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 30 Aug 2017 04:25:38 +0300 |
parents | efccab043dd3 |
children |
comparison
equal
deleted
inserted
replaced
1213:64f287c8cc62 | 1214:a05ba24a462b |
---|---|
44 location / { | 44 location / { |
45 proxy_pass http://127.0.0.1:8081; | 45 proxy_pass http://127.0.0.1:8081; |
46 proxy_cache NAME; | 46 proxy_cache NAME; |
47 proxy_cache_valid 200 1m; | 47 proxy_cache_valid 200 1m; |
48 } | 48 } |
49 | |
49 location /min_uses { | 50 location /min_uses { |
50 proxy_pass http://127.0.0.1:8081/; | 51 proxy_pass http://127.0.0.1:8081/; |
51 proxy_cache NAME; | 52 proxy_cache NAME; |
52 proxy_cache_valid 200 1m; | 53 proxy_cache_valid 200 1m; |
53 proxy_cache_min_uses 2; | 54 proxy_cache_min_uses 2; |
57 server { | 58 server { |
58 listen 127.0.0.1:8081; | 59 listen 127.0.0.1:8081; |
59 server_name localhost; | 60 server_name localhost; |
60 | 61 |
61 location / { | 62 location / { |
62 if ($arg_s) { | 63 } |
63 limit_rate 50k; | 64 |
64 } | 65 location /tbig.html { |
66 limit_rate 50k; | |
65 } | 67 } |
66 } | 68 } |
67 } | 69 } |
68 | 70 |
69 EOF | 71 EOF |
98 qr/^THIS/m, 'range below min_uses'); | 100 qr/^THIS/m, 'range below min_uses'); |
99 | 101 |
100 like(http_get_range('/min_uses/t.html?4', 'Range: bytes=0-2,4-'), | 102 like(http_get_range('/min_uses/t.html?4', 'Range: bytes=0-2,4-'), |
101 qr/^SEE.*^THIS/ms, 'multipart range below min_uses'); | 103 qr/^SEE.*^THIS/ms, 'multipart range below min_uses'); |
102 | 104 |
103 like(http_get_range('/tbig.html?s=1', 'Range: bytes=0-19'), | 105 like(http_get_range('/tbig.html', 'Range: bytes=0-19'), |
104 qr/^XX000001XXXX000002XX$/ms, 'range of response received in parts'); | 106 qr/^XX000001XXXX000002XX$/ms, 'range of response received in parts'); |
105 | 107 |
106 ############################################################################### | 108 ############################################################################### |
107 | 109 |
108 sub http_get_range { | 110 sub http_get_range { |