comparison proxy_cache_vary.t @ 489:3036e3af0e08

Tests: more Vary normalization tests.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 21 Oct 2014 03:46:20 +0400
parents 7e823c8f7d31
children 34280f6b0bc6
comparison
equal deleted inserted replaced
488:8474d27c9147 489:3036e3af0e08
101 101
102 $t->write_file('index.html', 'SEE-THIS'); 102 $t->write_file('index.html', 'SEE-THIS');
103 $t->write_file('asterisk', 'SEE-THIS'); 103 $t->write_file('asterisk', 'SEE-THIS');
104 $t->write_file('complex', 'SEE-THIS'); 104 $t->write_file('complex', 'SEE-THIS');
105 105
106 $t->try_run('no proxy_ignore_headers Vary')->plan(41); 106 $t->try_run('no proxy_ignore_headers Vary')->plan(42);
107 107
108 ############################################################################### 108 ###############################################################################
109 109
110 local $TODO = 'not yet' unless $t->has_version('1.7.7'); 110 local $TODO = 'not yet' unless $t->has_version('1.7.7');
111 111
235 # o normalizing both header field values in a way that is known to 235 # o normalizing both header field values in a way that is known to
236 # have identical semantics, according to the header field's 236 # have identical semantics, according to the header field's
237 # specification (e.g., reordering field values when order is not 237 # specification (e.g., reordering field values when order is not
238 # significant; case-normalization, where values are defined to be 238 # significant; case-normalization, where values are defined to be
239 # case-insensitive) 239 # case-insensitive)
240 #
241 # Only whitespace normalization is currently implemented.
240 242
241 like(get('/', 'foo, bar'), qr/MISS/ms, 'normalize first'); 243 like(get('/', 'foo, bar'), qr/MISS/ms, 'normalize first');
242 like(get('/', 'foo,bar'), qr/HIT/ms, 'normalize whitespace'); 244 like(get('/', 'foo,bar'), qr/HIT/ms, 'normalize whitespace');
243 like(get('/', 'foo,, ,bar , '), qr/HIT/ms, 'normalize empty'); 245 like(get('/', 'foo,, ,bar , '), qr/HIT/ms, 'normalize empty');
246 like(get('/', 'foobar'), qr/MISS/ms, 'normalize no whitespace mismatch');
244 247
245 TODO: { 248 TODO: {
246 local $TODO = 'not yet'; 249 local $TODO = 'not yet';
247 250
248 like(get('/', 'bar,foo'), qr/HIT/ms, 'normalize order'); 251 like(get('/', 'bar,foo'), qr/HIT/ms, 'normalize order');