Mercurial > hg > nginx-tests
diff http_uri.t @ 1714:e4e711d07e6c
Tests: added URI tests with forbidden control characters.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 29 Jun 2021 11:58:21 +0300 |
parents | 9fac05e479fa |
children | 2a0a6035a1af |
line wrap: on
line diff
--- a/http_uri.t +++ b/http_uri.t @@ -22,7 +22,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(17) +my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(19) ->write_file_expand('nginx.conf', <<'EOF')->run(); %%TEST_GLOBALS%% @@ -83,4 +83,13 @@ like(http_get('/ /'), qr/400 Bad/, 'spac } +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.21.1'); + +like(http_get("/\x02"), qr/400 Bad/, 'control'); + +} + +like(http_get('/%02'), qr!x /\x02 x!, 'control escaped'); + ###############################################################################