From b28950d5e701055f536f66c70b581c3cf806f3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 6 Nov 2020 11:52:03 +0100 Subject: Fix IsFin mismatch in HTTP/2 CONNECT response The response ends when the tunnel is established, even if the stream itself does not. The data coming in on the stream after is not part of the response. This makes both HTTP/1.1 and HTTP/2 send 'fin' to successful CONNECT responses. --- test/socks_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/socks_SUITE.erl') diff --git a/test/socks_SUITE.erl b/test/socks_SUITE.erl index f6686a3..e23124f 100644 --- a/test/socks_SUITE.erl +++ b/test/socks_SUITE.erl @@ -449,7 +449,7 @@ do_socks5_through_h2_connect_proxy(_OriginScheme, OriginTransport, ProxyScheme, <<":method">> := <<"CONNECT">>, <<":authority">> := Authority1 }} = receive_from(Proxy1Pid), - {response, nofin, 200, _} = gun:await(ConnPid, StreamRef), + {response, fin, 200, _} = gun:await(ConnPid, StreamRef), %% First the HTTP/2 tunnel is up, then the SOCKS tunnel to the origin HTTP server. {up, socks} = gun:await(ConnPid, StreamRef), {up, http} = gun:await(ConnPid, StreamRef), -- cgit v1.2.3