diff http_host.t @ 1551:27237569776f

Tests: additional Transfer-Encoding and Host headers tests.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 27 Feb 2020 19:49:54 +0300
parents 9d579fc770a6
children 8659123d2d37
line wrap: on
line diff
--- a/http_host.t
+++ b/http_host.t
@@ -22,7 +22,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(35);
+my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(36);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -169,6 +169,13 @@ is(http_absolute_path(
 is(http_host_header('123.40.56.78:9000:80'), '123.40.56.78',
 	'double port hack');
 
+TODO: {
+local $TODO = 'not yet' unless $t->has_version('1.17.9');
+
+like(http_host_header("localhost\nHost: again", 1), qr/ 400 /, 'host repeat');
+
+}
+
 ###############################################################################
 
 sub http_host_header {