From f8758c61e600673504ea7375cdcb7a207cfb1a32 Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 6 Mar 2015 17:50:12 +0900 Subject: [PATCH] Refactored a few for HttpListenerRequest.cs --- websocket-sharp/Net/HttpListenerRequest.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/websocket-sharp/Net/HttpListenerRequest.cs b/websocket-sharp/Net/HttpListenerRequest.cs index 383a1151..976c2ee6 100644 --- a/websocket-sharp/Net/HttpListenerRequest.cs +++ b/websocket-sharp/Net/HttpListenerRequest.cs @@ -126,8 +126,7 @@ namespace WebSocketSharp.Net /// public int ClientCertificateError { get { - // TODO: Always returns 0. - return 0; + return 0; // TODO: Always returns 0. } } @@ -356,8 +355,7 @@ namespace WebSocketSharp.Net /// public string RawUrl { get { - // TODO: Should decode? - return _url.PathAndQuery; + return _url.PathAndQuery; // TODO: Should decode? } } @@ -534,13 +532,13 @@ namespace WebSocketSharp.Net internal void FinishInitialization () { var host = _headers["Host"]; - var noHost = host == null || host.Length == 0; - if (_version > HttpVersion.Version10 && noHost) { + var nohost = host == null || host.Length == 0; + if (_version > HttpVersion.Version10 && nohost) { _context.ErrorMessage = "Invalid Host header"; return; } - if (noHost) + if (nohost) host = UserHostAddress; _url = HttpUtility.CreateRequestUrl (_uri, host, IsWebSocketRequest, IsSecureConnection);