diff options
author | Loïc Hoguin <[email protected]> | 2020-07-29 15:30:38 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-09-21 15:51:57 +0200 |
commit | f1e7517c05bb97c257ad7a39e170ebc91ca42149 (patch) | |
tree | b544e36bbc20c1bc63f21fde97d5345894db4d6d /test/rfc7540_SUITE.erl | |
parent | 048224a888b3331796e66dd974c6d75234e09036 (diff) | |
download | gun-f1e7517c05bb97c257ad7a39e170ebc91ca42149.tar.gz gun-f1e7517c05bb97c257ad7a39e170ebc91ca42149.tar.bz2 gun-f1e7517c05bb97c257ad7a39e170ebc91ca42149.zip |
Make HTTP/2 CONNECT to a SOCKS server work
Diffstat (limited to 'test/rfc7540_SUITE.erl')
-rw-r--r-- | test/rfc7540_SUITE.erl | 6 |
1 files changed, 5 insertions, 1 deletions
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) |