# HG changeset patch # User Sergey Kandaurov # Date 1458771181 -10800 # Node ID e309d9701007dd5509d230c9ee16b875a46c20dc # Parent 56ed4be9ff41984952af35cbe4365505a506090b Tests: avoid RST in HTTP/2 proxy_protocol tests. Do not write to a socket that was shut down by the peer. On win32 this can result in WSAECONNABORTED read error before all pending data was delivered. diff --git a/h2_proxy_protocol.t b/h2_proxy_protocol.t --- a/h2_proxy_protocol.t +++ b/h2_proxy_protocol.t @@ -70,9 +70,8 @@ is($frame->{headers}->{'x-pp'}, '192.0.2 # invalid PROXY protocol string -$sess = new_session(8081, proxy => 'BOGUS TCP4 192.0.2.1 192.0.2.2 1234 5678', - pure => 1); -$frames = h2_read($sess, all => [{ type => 'GOAWAY' }]); +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' }]); ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; ok($frame, 'invalid PROXY - GOAWAY frame');