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