From b44feed4c77a2854c5d51c0ac40b7051984b80db Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 15 Jan 2019 21:34:42 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/HttpUtility.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index bc32a24a..39a785b3 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -744,11 +744,8 @@ namespace WebSocketSharp.Net + (secure ? "s" : String.Empty); } - if (host.IndexOf (':') == -1) { - host = String.Format ( - "{0}:{1}", host, schm == "http" || schm == "ws" ? 80 : 443 - ); - } + if (host.IndexOf (':') == -1) + host = String.Format ("{0}:{1}", host, secure ? 443 : 80); var url = String.Format ("{0}://{1}{2}", schm, host, path);