diff options
-rw-r--r-- | t/integration.ru | 1 | ||||
-rw-r--r-- | t/integration.t | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/t/integration.ru b/t/integration.ru index 6ef873c..5183217 100644 --- a/t/integration.ru +++ b/t/integration.ru @@ -23,6 +23,7 @@ run(lambda do |env| when 'GET' case env['PATH_INFO'] when '/rack-2-newline-headers'; [ 200, { 'X-R2' => "a\nb\nc" }, [] ] + when '/rack-3-array-headers'; [ 200, { 'x-r3' => %w(a b c) }, [] ] when '/nil-header-value'; [ 200, { 'X-Nil' => nil }, [] ] when '/unknown-status-pass-through'; [ '666 I AM THE BEAST', {}, [] ] end # case PATH_INFO (GET) diff --git a/t/integration.t b/t/integration.t index 5569155..e876c71 100644 --- a/t/integration.t +++ b/t/integration.t @@ -38,6 +38,15 @@ SKIP: { # Date header check diag(explain([$t, $!, \@d])); }; + +$c = tcp_connect($srv); +print $c "GET /rack-3-array-headers HTTP/1.0\r\n\r\n" or die $!; +($status, $hdr) = slurp_hdr($c); +is_deeply([ grep(/^x-r3: /, @$hdr) ], + [ 'x-r3: a', 'x-r3: b', 'x-r3: c' ], + 'rack 3 array headers supported') or diag(explain($hdr)); + + # cf. <CAO47=rJa=zRcLn_Xm4v2cHPr6c0UswaFC_omYFEH+baSxHOWKQ@mail.gmail.com> $c = tcp_connect($srv); print $c "GET /nil-header-value HTTP/1.0\r\n\r\n" or die $!; |