# HG changeset patch # User Maxim Dounin # Date 1653935624 -10800 # Node ID fb88778d4580e8713adbf2226fc824ccce2f523c # Parent d7e019157cd7a3fce961393edff474a924ebfeea Tests: perl $r->header_in() combining headers test. diff --git a/perl.t b/perl.t --- a/perl.t +++ b/perl.t @@ -23,7 +23,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http perl rewrite/)->plan(25) +my $t = Test::Nginx->new()->has(qw/http perl rewrite/)->plan(27) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -153,6 +153,18 @@ like(http( . 'Host: localhost' . CRLF . CRLF ), qr/xfoo: foo/, 'perl header_in unknown'); +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.23.0'); + +like(http( + 'GET / HTTP/1.0' . CRLF + . 'X-Foo: foo' . CRLF + . 'X-Foo: bar' . CRLF + . 'Host: localhost' . CRLF . CRLF +), qr/xfoo: foo, bar/, 'perl header_in unknown2'); + +} + like(http( 'GET / HTTP/1.0' . CRLF . 'Cookie: foo' . CRLF @@ -188,6 +200,13 @@ like(http( . 'Host: localhost' . CRLF . CRLF ), qr/connection: close/, 'perl header_in connection'); +like(http( + 'GET / HTTP/1.0' . CRLF + . 'Connection: close' . CRLF + . 'Connection: foo' . CRLF + . 'Host: localhost' . CRLF . CRLF +), qr/connection: close, foo/, 'perl header_in connection2'); + } # headers_out content-length tests with range filter