From 7ca0f85515dca4917bfe6f9968e24320db6cea6e Mon Sep 17 00:00:00 2001 From: sta Date: Sun, 1 Dec 2019 21:07:41 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/HttpListenerResponse.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/websocket-sharp/Net/HttpListenerResponse.cs b/websocket-sharp/Net/HttpListenerResponse.cs index 893c8fca..1ea61cb8 100644 --- a/websocket-sharp/Net/HttpListenerResponse.cs +++ b/websocket-sharp/Net/HttpListenerResponse.cs @@ -676,8 +676,12 @@ namespace WebSocketSharp.Net headers.InternalSet ("Server", "websocket-sharp/1.0", true); var prov = CultureInfo.InvariantCulture; - if (headers["Date"] == null) - headers.InternalSet ("Date", DateTime.UtcNow.ToString ("r", prov), true); + + if (headers["Date"] == null) { + headers.InternalSet ( + "Date", DateTime.UtcNow.ToString ("r", prov), true + ); + } if (!_sendChunked) headers.InternalSet ("Content-Length", _contentLength.ToString (prov), true);