Mercurial > hg > nginx-tests
changeset 441:cd61bacbbfe0
Tests: ensure that $uri is reset on URI parsing errors.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 22 Jul 2014 13:34:50 +0400 |
parents | 13ffba66f4e3 |
children | cc4697d6bd16 |
files | http_variables.t |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/http_variables.t Fri Jul 18 13:55:32 2014 +0400 +++ b/http_variables.t Tue Jul 22 13:34:50 2014 +0400 @@ -22,7 +22,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http rewrite proxy/)->plan(3); +my $t = Test::Nginx->new()->has(qw/http rewrite proxy/)->plan(4); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -69,6 +69,7 @@ ############################################################################### http_get('/'); +http_get('/../bad_uri'); http_get('/redefine'); $t->stop(); @@ -83,6 +84,13 @@ close LOG; } +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.7.4'); + +like($log, qr!^: -$!m, 'no uri'); + +} + like($log, qr!^/: -$!m, 'no header'); like($log, qr!^/set: max-age=3600[,;] private[,;] must-revalidate$!m, 'multi headers');