Mercurial > hg > nginx-tests
diff http_host.t @ 1716:c48b2b0b8c2a
Tests: added Host header test with control character.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 29 Jun 2021 12:00:41 +0300 |
parents | 5ac6efbe5552 |
children | 2a0a6035a1af |
line wrap: on
line diff
--- a/http_host.t Tue Jun 29 12:00:07 2021 +0300 +++ b/http_host.t Tue Jun 29 12:00:41 2021 +0300 @@ -22,7 +22,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(36); +my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(37); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -171,6 +171,13 @@ like(http_host_header("localhost\nHost: again", 1), qr/ 400 /, 'host repeat'); +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.21.1'); + +like(http_host_header("localhost\x02", 1), qr/ 400 /, 'control'); + +} + ############################################################################### sub http_host_header {