From ff0337599aa08518dbd577ffd689ab68a58ad8cc Mon Sep 17 00:00:00 2001 From: sta Date: Mon, 2 Dec 2019 22:07:25 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/HttpListenerResponse.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/websocket-sharp/Net/HttpListenerResponse.cs b/websocket-sharp/Net/HttpListenerResponse.cs index 1ea61cb8..4bcb0300 100644 --- a/websocket-sharp/Net/HttpListenerResponse.cs +++ b/websocket-sharp/Net/HttpListenerResponse.cs @@ -683,10 +683,14 @@ namespace WebSocketSharp.Net ); } - if (!_sendChunked) - headers.InternalSet ("Content-Length", _contentLength.ToString (prov), true); - else + if (!_sendChunked) { + headers.InternalSet ( + "Content-Length", _contentLength.ToString (prov), true + ); + } + else { headers.InternalSet ("Transfer-Encoding", "chunked", true); + } /* * Apache forces closing the connection for these status codes: