Tests: perl $r->header_in("Connection") test.
diff --git a/perl.t b/perl.t
index b5ede66..79efc75 100644
--- a/perl.t
+++ b/perl.t
@@ -23,7 +23,7 @@
select STDERR; $| = 1;
select STDOUT; $| = 1;
-my $t = Test::Nginx->new()->has(qw/http perl rewrite/)->plan(24)
+my $t = Test::Nginx->new()->has(qw/http perl rewrite/)->plan(25)
->write_file_expand('nginx.conf', <<'EOF');
%%TEST_GLOBALS%%
@@ -62,6 +62,7 @@
$r->print("xfoo: ", $r->header_in("X-Foo"), "\n");
$r->print("cookie: ", $r->header_in("Cookie"), "\n");
$r->print("xff: ", $r->header_in("X-Forwarded-For"), "\n");
+ $r->print("connection: ", $r->header_in("Connection"), "\n");
return OK;
}';
@@ -178,6 +179,17 @@
. 'Host: localhost' . CRLF . CRLF
), qr/xff: foo1, foo2/, 'perl header_in xff2');
+TODO: {
+local $TODO = 'not yet' unless $t->has_version('1.23.0');
+
+like(http(
+ 'GET / HTTP/1.0' . CRLF
+ . 'Connection: close' . CRLF
+ . 'Host: localhost' . CRLF . CRLF
+), qr/connection: close/, 'perl header_in connection');
+
+}
+
# headers_out content-length tests with range filter
like(http_get('/range'), qr/Content-Length: 42.*^x{42}$/ms,