Tests: tests for multiple Vary headers (ticket #1423).
diff --git a/proxy_cache_vary.t b/proxy_cache_vary.t
index 48f29b7..88807a6 100644
--- a/proxy_cache_vary.t
+++ b/proxy_cache_vary.t
@@ -22,7 +22,7 @@
 select STDOUT; $| = 1;
 
 my $t = Test::Nginx->new()->has(qw/http proxy cache gzip rewrite/)
-	->plan(49)->write_file_expand('nginx.conf', <<'EOF');
+	->plan(52)->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
 
@@ -93,6 +93,12 @@
             add_header Vary ",, Accept-encoding , ,";
         }
 
+        location /multi {
+            gzip off;
+            add_header Vary Accept-Encoding;
+            add_header Vary Foo;
+        }
+
         location /cold {
             expires max;
             add_header Vary $arg_vary;
@@ -106,6 +112,7 @@
 $t->write_file('index.html', 'SEE-THIS');
 $t->write_file('asterisk', 'SEE-THIS');
 $t->write_file('complex', 'SEE-THIS');
+$t->write_file('multi', 'SEE-THIS');
 $t->write_file('cold', 'SEE-THIS');
 
 $t->run();
@@ -255,6 +262,18 @@
 
 }
 
+# Multiple Vary headers (ticket #1423).
+
+like(get('/multi', 'foo'), qr/MISS/ms, 'multi first');
+like(get('/multi', 'foo'), qr/HIT/ms, 'multi second');
+
+TODO: {
+local $TODO = 'not yet' unless $t->has_version('1.23.0');
+
+like(get('/multi', 'bar'), qr/MISS/ms, 'multi other');
+
+}
+
 # keep c->body_start when Vary changes (ticket #2029)
 
 # before 1.19.3, this prevented updating c->body_start of a main key