From 93c88fdc541c3f8a4ebbae3699bee90d00dc637f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 4 Jun 2018 08:40:31 +0200 Subject: Remove the dependency on Ranch We instead of two new modules, gun_tcp and gun_tls. They only have 6 functions so far, much less than what Ranch provided before. Also renames ssl to tls where applicable. It's still possible to use the ssl transport option but it's now undocumented. --- src/gun_http.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gun_http.erl') diff --git a/src/gun_http.erl b/src/gun_http.erl index 2fd0aac..61409fb 100644 --- a/src/gun_http.erl +++ b/src/gun_http.erl @@ -500,7 +500,7 @@ ws_upgrade(State=#http_state{socket=Socket, transport=Transport, owner=Owner, ou {<<"sec-websocket-key">>, Key} |Headers2 ], - IsSecure = Transport:secure(), + IsSecure = Transport =:= gun_tls, Headers = case lists:keymember(<<"host">>, 1, Headers0) of true -> Headers3; false when Port =:= 80, not IsSecure -> [{<<"host">>, Host}|Headers3]; -- cgit v1.2.3