diff options
Diffstat (limited to 'src/gun_http.erl')
-rw-r--r-- | src/gun_http.erl | 2 |
1 files changed, 1 insertions, 1 deletions
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]; |