@@ -23,7 +23,7 @@ use Test::Nginx;
23
23
select STDERR ; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
- my $t = Test::Nginx-> new()-> has(qw/ http perl rewrite/ )-> plan(24 )
26
+ my $t = Test::Nginx-> new()-> has(qw/ http perl rewrite/ )-> plan(25 )
27
27
-> write_file_expand(' nginx.conf' , <<'EOF' );
28
28
29
29
%%TEST_GLOBALS%%
62
62
$r->print("xfoo: ", $r->header_in("X-Foo"), "\n");
63
63
$r->print("cookie: ", $r->header_in("Cookie"), "\n");
64
64
$r->print("xff: ", $r->header_in("X-Forwarded-For"), "\n");
65
+ $r->print("connection: ", $r->header_in("Connection"), "\n");
65
66
66
67
return OK;
67
68
}';
@@ -178,6 +179,17 @@ like(http(
178
179
. ' Host: localhost' . CRLF . CRLF
179
180
), qr / xff: foo1, foo2/ , ' perl header_in xff2' );
180
181
182
+ TODO: {
183
+ local $TODO = ' not yet' unless $t -> has_version(' 1.23.0' );
184
+
185
+ like(http(
186
+ ' GET / HTTP/1.0' . CRLF
187
+ . ' Connection: close' . CRLF
188
+ . ' Host: localhost' . CRLF . CRLF
189
+ ), qr / connection: close/ , ' perl header_in connection' );
190
+
191
+ }
192
+
181
193
# headers_out content-length tests with range filter
182
194
183
195
like(http_get(' /range' ), qr / Content-Length: 42.*^x{42}$ / ms ,
0 commit comments