Mercurial > hg > nginx-tests
changeset 846:9b5e1c5f0240
Tests: added HTTP/2 test with charset.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 05 Feb 2016 17:40:56 +0300 |
parents | e31f1b5bb569 |
children | 7de036e89770 |
files | h2.t |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/h2.t Thu Feb 04 18:05:52 2016 +0300 +++ b/h2.t Fri Feb 05 17:40:56 2016 +0300 @@ -32,7 +32,7 @@ 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 @@ add_header X-Cookie-c $cookie_c; return 200; } + location /charset { + charset utf-8; + return 200; + } } server { @@ -1351,6 +1355,15 @@ ($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();