From e1de84585490e85166926416e4eb5cea95e0e604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 20 Aug 2020 15:29:38 +0200 Subject: Add gun_tunnel_up message to HTTP/2 CONNECT --- test/rfc7540_SUITE.erl | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'test/rfc7540_SUITE.erl') diff --git a/test/rfc7540_SUITE.erl b/test/rfc7540_SUITE.erl index a6bb440..38cbe9f 100644 --- a/test/rfc7540_SUITE.erl +++ b/test/rfc7540_SUITE.erl @@ -443,14 +443,6 @@ connect_http_via_h2(_) -> do_connect_http(<<"http">>, tcp, http, <<"https">>, tls). connect_https_via_h2(_) -> - -%dbg:tracer(), -%dbg:tpl(gun, []), -%dbg:tpl(gun_http2, []), -%dbg:tpl(gun_tls_proxy, []), -%dbg:tpl(gun_tls_proxy_http2_connect, []), -%dbg:p(all, c), - doc("CONNECT can be used to establish a TLS connection " "to an HTTP/1.1 server via a TLS HTTP/2 proxy. (RFC7540 8.3)"), do_connect_http(<<"https">>, tls, http, <<"https">>, tls). @@ -514,12 +506,7 @@ do_connect_http(OriginScheme, OriginTransport, OriginProtocol, ProxyScheme, Prox }} = receive_from(ProxyPid), {response, nofin, 200, _} = gun:await(ConnPid, StreamRef), handshake_completed = receive_from(OriginPid), - %% @todo The 200 response must not be sent before the TLS handshake completed successfully? - %% Or the coming request must be kept around until the tunnel is up? We probably need - %% to gun_tunnel_up or something to inform the user the tunnel is up. - %% - %% @todo QUEUE data until the tunnel is up? Send a gun_up of some kind? - timer:sleep(1000), + {up, OriginProtocol} = gun:await(ConnPid, StreamRef), ProxiedStreamRef = gun:get(ConnPid, "/proxied", #{}, #{tunnel => StreamRef}), #{<<":authority">> := Authority} = receive_from(OriginPid), #{ -- cgit v1.2.3