Fix for pull request #155, merged 710b1e89b0

This commit is contained in:
sta 2015-08-25 14:29:03 +09:00
parent 0cddc67001
commit 3c060c545a

View File

@ -37,6 +37,13 @@
*/ */
#endregion #endregion
#region Contributors
/*
* Contributors:
* - Nicholas Devenish
*/
#endregion
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
@ -565,7 +572,7 @@ namespace WebSocketSharp.Net
writer.Flush (); writer.Flush ();
// Assumes that the destination was at position 0. // Assumes that the destination was at position 0.
destination.Position = enc.CodePage == 65001 ? 3 : enc.GetPreamble ().Length; destination.Position = enc.GetPreamble ().Length;
return headers; return headers;
} }