Mercurial > hg > nginx-tests
changeset 946:e3df9c2100de
Tests: fixed HTTP/2 test with invalid PROXY protocol string.
Previously it tested invalid connection preface.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 15 Jun 2016 19:00:45 +0300 |
parents | d73bef563aea |
children | b9e42c554ba7 |
files | h2_proxy_protocol.t |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/h2_proxy_protocol.t Wed Jun 15 13:27:56 2016 +0300 +++ b/h2_proxy_protocol.t Wed Jun 15 19:00:45 2016 +0300 @@ -39,7 +39,6 @@ %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; listen 127.0.0.1:8081 proxy_protocol http2; server_name localhost; @@ -70,8 +69,9 @@ # invalid PROXY protocol string -my $s = http('BOGUS TCP4 192.0.2.1 192.0.2.2 1234 5678', start => 1); -$frames = h2_read({ socket => $s }, all => [{ type => 'GOAWAY' }]); +$proxy = 'BOGUS TCP4 192.0.2.1 192.0.2.2 1234 5678' . CRLF; +$sess = new_session(8081, preface => $proxy, pure => 1); +$frames = h2_read($sess, all => [{ type => 'GOAWAY' }]); ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; ok($frame, 'invalid PROXY - GOAWAY frame');