Tests: added generic tests for $arg_ variables.
diff --git a/http_variables.t b/http_variables.t
index 2bc98b5..7ea6325 100644
--- a/http_variables.t
+++ b/http_variables.t
@@ -22,7 +22,7 @@
select STDERR; $| = 1;
select STDOUT; $| = 1;
-my $t = Test::Nginx->new()->has(qw/http rewrite proxy/)->plan(6);
+my $t = Test::Nginx->new()->has(qw/http rewrite proxy/)->plan(7);
$t->write_file_expand('nginx.conf', <<'EOF');
@@ -48,6 +48,10 @@
return 200 OK;
}
+ location /arg {
+ return 200 $arg_l:$arg_;
+ }
+
location /set {
add_header Cache-Control max-age=3600;
add_header Cache-Control private;
@@ -78,6 +82,14 @@
http_get('/../bad_uri');
http_get('/redefine');
+TODO: {
+todo_skip 'overflow', 1 unless $ENV{TEST_NGINX_UNSAFE}
+ or $t->has_version('1.19.0');
+
+like(http_get('/arg?l=42'), qr/42:$/, 'arg');
+
+}
+
# $limit_rate is a special variable that has its own set_handler / get_handler
like(http_get('/limit_rate?l=40k'), qr/X-Rate: 40960/, 'limit_rate handlers');