# HG changeset patch # User Sergey Kandaurov # Date 1454683256 -10800 # Node ID 9b5e1c5f024013872f7b152af2a545c2b4293a41 # Parent e31f1b5bb569777ea6a274acf29a46a9cd35a55b Tests: added HTTP/2 test with charset. diff --git a/h2.t b/h2.t --- a/h2.t +++ b/h2.t @@ -32,7 +32,7 @@ plan(skip_all => 'IO::Socket::SSL too ol my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2 proxy cache/) ->has(qw/limit_conn rewrite realip shmem/) - ->has_daemon('openssl')->plan(306); + ->has_daemon('openssl')->plan(307); # Some systems may have also a bug in not treating zero writev iovcnt as EINVAL @@ -190,6 +190,10 @@ http { add_header X-Cookie-c $cookie_c; return 200; } + location /charset { + charset utf-8; + return 200; + } } server { @@ -1351,6 +1355,15 @@ is($frame->{headers}->{'content-encoding ($frame) = grep { $_->{type} eq "DATA" } @$frames; gunzip_like($frame->{data}, qr/^SEE-THIS\Z/, 'gzip - DATA'); +# charset + +$sess = new_session(); +$sid = new_stream($sess, { path => '/charset' }); +$frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); + +($frame) = grep { $_->{type} eq "HEADERS" } @$frames; +is($frame->{headers}->{'content-type'}, 'text/plain; charset=utf-8', 'charset'); + # simple proxy cache test $sess = new_session();