diff options
Diffstat (limited to 'src/gun_http.erl')
-rw-r--r-- | src/gun_http.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl index efcea35..02344ee 100644 --- a/src/gun_http.erl +++ b/src/gun_http.erl @@ -231,12 +231,12 @@ handle_head(Data, State=#http_state{socket=Socket, transport=Transport, TLSTimeout = maps:get(tls_handshake_timeout, Destination, infinity), {ok, ProxyPid} = gun_tls_proxy:start_link(NewHost, NewPort, TLSOpts, TLSTimeout, Socket, gun_tls), + %% In this case the switch_protocol is delayed and is handled by + %% a message sent from gun_tls_proxy once the connection is established, + %% and handled by the gun module directly. [{state, State2#http_state{socket=ProxyPid, transport=gun_tls_proxy}}, {origin, <<"https">>, NewHost, NewPort, connect}, {switch_transport, gun_tls_proxy, ProxyPid}]; - %% @todo Might also need to switch protocol, but gotta wait - %% @todo for the TLS connection to be established first. - %% @todo Should have a gun_tls_proxy event indicating connection success. #{transport := tls} -> TLSOpts = maps:get(tls_opts, Destination, []), TLSTimeout = maps:get(tls_handshake_timeout, Destination, infinity), |