Tests: fixed HTTP/2 test with invalid PROXY protocol string. Previously it tested invalid connection preface.
diff --git a/h2_proxy_protocol.t b/h2_proxy_protocol.t index eb8a89d..d1b539c 100644 --- a/h2_proxy_protocol.t +++ b/h2_proxy_protocol.t
@@ -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');