From f1e7517c05bb97c257ad7a39e170ebc91ca42149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 29 Jul 2020 15:30:38 +0200 Subject: Make HTTP/2 CONNECT to a SOCKS server work --- test/rfc7540_SUITE.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/rfc7540_SUITE.erl') diff --git a/test/rfc7540_SUITE.erl b/test/rfc7540_SUITE.erl index 879c342..ebc5392 100644 --- a/test/rfc7540_SUITE.erl +++ b/test/rfc7540_SUITE.erl @@ -559,7 +559,8 @@ do_connect_cowboy(_OriginScheme, OriginTransport, OriginProtocol, _ProxyScheme, {ok, Ref, OriginPort} = do_cowboy_origin(OriginTransport, OriginProtocol), try {ok, ProxyPid, ProxyPort} = do_proxy_start(ProxyTransport, [ - #proxy_stream{id=1, status=200} + #proxy_stream{id=1, status=200}, + #proxy_stream{id=3, status=299} ]), Authority = iolist_to_binary(["localhost:", integer_to_binary(OriginPort)]), {ok, ConnPid} = gun:open("localhost", ProxyPort, #{ @@ -581,6 +582,9 @@ do_connect_cowboy(_OriginScheme, OriginTransport, OriginProtocol, _ProxyScheme, {response, nofin, 200, _} = gun:await(ConnPid, StreamRef), ProxiedStreamRef = gun:get(ConnPid, "/proxied", #{}, #{tunnel => StreamRef}), {response, nofin, 200, _} = gun:await(ConnPid, ProxiedStreamRef), + %% We can create more requests on the proxy as well. + ProxyStreamRef = gun:get(ConnPid, "/"), + {response, fin, 299, _} = gun:await(ConnPid, ProxyStreamRef), gun:close(ConnPid) after cowboy:stop_listener(Ref) -- cgit v1.2.3