From 3c060c545a101392a7029d3a44327bcdbde0ea57 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 25 Aug 2015 14:29:03 +0900 Subject: [PATCH] Fix for pull request #155, merged https://github.com/ndevenish/websocket-sharp/commit/710b1e89b0ca52a86ef91b3124ac022594f65a2b --- websocket-sharp/Net/HttpListenerResponse.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/websocket-sharp/Net/HttpListenerResponse.cs b/websocket-sharp/Net/HttpListenerResponse.cs index 8ee98cd5..92c0a797 100644 --- a/websocket-sharp/Net/HttpListenerResponse.cs +++ b/websocket-sharp/Net/HttpListenerResponse.cs @@ -37,6 +37,13 @@ */ #endregion +#region Contributors +/* + * Contributors: + * - Nicholas Devenish + */ +#endregion + using System; using System.Collections.Generic; using System.Globalization; @@ -565,7 +572,7 @@ namespace WebSocketSharp.Net writer.Flush (); // Assumes that the destination was at position 0. - destination.Position = enc.CodePage == 65001 ? 3 : enc.GetPreamble ().Length; + destination.Position = enc.GetPreamble ().Length; return headers; }