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
+++ b/http_variables.t
@@ -22,7 +22,7 @@ use Test::Nginx;
 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 @@ EOF
 ###############################################################################
 
 http_get('/');
+http_get('/../bad_uri');
 http_get('/redefine');
 
 $t->stop();
@@ -83,6 +84,13 @@ my $log;
 	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');